Sentry for Citizens2

Sentry for Citizens2

Sentry is a character plugin for the NPC plugin Citizens2. With Sentry, NPC's can be set to guard areas or act as bodyguards. Hostile targeting, retaliation, and a variety of options and stats allow a Sentry NPC to be customized to almost any guarding or combat situation.


Sentries Can:

  • Attack monsters, players, and groups automatically. Sentry also has built-in support for Factions, Towny, War and SimpleClans
  • Kill, and be killed by, players, monsters, and the environment.
  • Guard locations, paths, players, or other NPCs.
  • Use ranged or melee weapons. Shoot arrows, fireballs, snowballs, eggs, lightning, and potions with deadly accuracy.
  • Be configured with stats such as Strength, Health, Armor, Speed, Range and even Night Vision!
  • Ride mounts!
  • Work with Denizen to become Bosses and Quest NPCs that run scripts upon death.


A full list of commands and options is available on the Citizens 2 Wiki


Sentry makes a config.yml in the plugins/Sentry folder on first load. Use this to tailor Sentry to your server. You can:

  • Set defaults for new sentries
  • Change or disable the item used for various attack types
  • Add potion effects like slow or blindness to certain Sentry weapons.
  • Add armor, strength and speed buffs to armor and weapons for Sentries.
  • Set critical hit chances and messages.

The config.yml is commented with instructions.

You must login to post a comment. Don't have an account? Register to get one!

  • Avatar of Telson Telson Aug 29, 2014 at 04:14 UTC - 0 likes

    Just installed the latest version of Citizens 2 and Sentry. They are the only 2 plugins i have.

    For some reason, the sentries cant damage other sentries or me. it can damage and be damaged by mobs though. Any idea?

  • Avatar of mcmonkey4eva mcmonkey4eva Aug 23, 2014 at 18:00 UTC - 0 likes

    @iSynn: Go

    You downloaded 1.7.9-compatible Sentry. Get 1.8.2b3 here

  • Avatar of iSynn iSynn Aug 23, 2014 at 16:21 UTC - 0 likes

    @mcmonkey4eva: Go

    I did update Sentry to 1.7.10. Did I perhaps download the wrong file..? ./trait sentry gives me java.lang.NoClassDefFoundError:net/minecraft/server/v1_7_R3/Packet

  • Avatar of mcmonkey4eva mcmonkey4eva Aug 20, 2014 at 19:43 UTC - 0 likes

    @Syraleaf: Go

    Citizens didn't, you somehow acquired the correct build.

    The other plugins, quite likely.

    Citizens and Sentry and plugins like them use /internal code/ that's outside the frame of the Bukkit API - we aren't supposed to be accessing it. To discourage us, the Bukkit team has taken to adding version numbers to the code, so it forces us to update our code every time Bukkit changes their numbers, or the plugin won't work.

  • Avatar of Syraleaf Syraleaf Aug 20, 2014 at 15:38 UTC - 0 likes

    @mcmonkey4eva: Go

    Woooops :D I got the version from the ""take the latest version here"" and it seems to be diffrend. I'll try the other one out now and post if it did not work :)

    {Edit}: I downgraded my sentry plugin and now it seems to work fine :) ty for your help! There is only 1 thing I dont get... Why do all the other plugins work with 1.7.10 (including my citizens) and did sentry not :)

    Last edited Aug 20, 2014 by Syraleaf
  • Avatar of CrazyPoloxD CrazyPoloxD Aug 19, 2014 at 09:02 UTC - 0 likes

    v. 1.8.2 build 3 06/13/14 download

    Update to work with Bukkit for MC 1.7.10

    And with this one

    v. 1.8.2 build 2 06/13/14 download

    mini-update to patch compatibility with latest Denizen dev builds

    This is my problem again :/

    And this one with this update

    v. 1.8.2 03/24/14 download

    Update to work with Bukkit for MC 1.7.8 -> (EDIT: then to 1.7.9 as well)

    [11:27:12 INFO]: xX98polo98Xx issued server command: /trait Sentry [11:27:12 WARN]: java.lang.ClassCastException: net.aufdemrand.sentry.Sentry cannot be cast to net.aufdemrand.sentry.Sentry [11:27:12 WARN]: at net.aufdemrand.sentry.SentryTrait.<init>( [11:27:12 WARN]: at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [11:27:12 WARN]: at sun.reflect.NativeConstructorAccessorImpl.newInstance( [11:27:12 WARN]: at sun.reflect.DelegatingConstructorAccessorImpl.newInstance( [11:27:12 WARN]: at java.lang.reflect.Constructor.newInstance( [11:27:12 WARN]: at java.lang.Class.newInstance( [11:27:12 WARN]: at net.citizensnpcs.api.trait.TraitInfo.tryCreateInstance( [11:27:12 WARN]: at net.citizensnpcs.npc.CitizensTraitFactory.create( [11:27:12 WARN]: at net.citizensnpcs.npc.CitizensTraitFactory.getTrait( [11:27:12 WARN]: at net.citizensnpcs.api.npc.AbstractNPC.getTraitFor( [11:27:12 WARN]: at net.citizensnpcs.api.npc.AbstractNPC.addTrait( [11:27:12 WARN]: at net.citizensnpcs.commands.TraitCommands.addTrait( [11:27:12 WARN]: at net.citizensnpcs.commands.TraitCommands.toggle( [11:27:12 WARN]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [11:27:12 WARN]: at sun.reflect.NativeMethodAccessorImpl.invoke( [11:27:12 WARN]: at sun.reflect.DelegatingMethodAccessorImpl.invoke( [11:27:12 WARN]: at java.lang.reflect.Method.invoke( [11:27:12 WARN]: at net.citizensnpcs.api.command.CommandManager.executeMethod( [11:27:12 WARN]: at net.citizensnpcs.api.command.CommandManager.execute( [11:27:12 WARN]: at net.citizensnpcs.api.command.CommandManager.executeSafe( [11:27:12 WARN]: at net.citizensnpcs.Citizens.onCommand( [11:27:12 WARN]: at org.bukkit.command.PluginCommand.execute( [11:27:12 WARN]: at org.bukkit.command.SimpleCommandMap.dispatch( [11:27:12 WARN]: at org.bukkit.craftbukkit.v1_7_R3.CraftServer.dispatchCommand( [11:27:12 WARN]: at net.minecraft.server.v1_7_R3.PlayerConnection.handleCommand( [11:27:12 WARN]: at net.minecraft.server.v1_7_R3.PlayerConnection.a( [11:27:12 WARN]: at net.minecraft.server.v1_7_R3.PacketPlayInChat.a( [11:27:12 WARN]: at net.minecraft.server.v1_7_R3.PacketPlayInChat.handle( [11:27:12 WARN]: at net.minecraft.server.v1_7_R3.NetworkManager.a( [11:27:12 WARN]: at net.minecraft.server.v1_7_R3.ServerConnection.c(SourceFile:134) [11:27:12 WARN]: at net.minecraft.server.v1_7_R3.MinecraftServer.v( [11:27:12 WARN]: at net.minecraft.server.v1_7_R3.DedicatedServer.v( [11:27:12 WARN]: at net.minecraft.server.v1_7_R3.MinecraftServer.u( [11:27:12 WARN]: at [11:27:12 WARN]: at [11:27:12 ERROR]: [Citizens] Cannot register a null trait. Was it registered properly?

    Last edited Aug 19, 2014 by CrazyPoloxD
  • Avatar of mcmonkey4eva mcmonkey4eva Aug 18, 2014 at 21:43 UTC - 0 likes

    @NuiluChu: Go

    @Syraleaf: Go

    That means you're running a 1.7.9 build of Sentry on (some other version. I can't know which other version because you didn't post the full error message).

    The solution is either updating or downdating Sentry to match your CraftBukkit version. Here's the list of Sentry updates with their compatible CB version:

  • Avatar of NuiluChu NuiluChu Aug 18, 2014 at 19:23 UTC - 0 likes

    <<reply 2314479>>

    Do you know what it means...? :/ I'm pretty stuck and I can't get any farther on this project on this server without it..

  • Avatar of Syraleaf Syraleaf Aug 18, 2014 at 12:12 UTC - 1 like

    @NuiluChu: Go

    I've got the exact same error. :(

  • Avatar of NuiluChu NuiluChu Aug 18, 2014 at 11:58 UTC - 0 likes

    Hey so uh... I'm getting this really really weird error when I select an npc and do ./trait Sentry  and I'm not really sure what it means at all... can anyone help me?

    This is the error: java.lang.NoClassDefFoundError:net/minecraft/server/v1_7_R3/Packet

Your favorite Brigade?

  1. Choice:

  1. Results
  2. 0 comments


Date created
Sep 11, 2012
Last update
Jun 03, 2014
Development stage
  • enUS
Public Domain
Curse link
Sentry for Citizens2
Recent files