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.
Features
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.
Installation
- Install Citizens2 You must use the correct version for your version of Bukkit
- Download the correct Sentry from the Citizens Wiki. You must use the correct version for your version of Bukkit
- Place Sentry.jar in your minecraft /plugins/ directory. Start your server.
- Create a NPC with Citizens and give it the 'sentry' trait.
/npc create Town Guard --trait sentry
- Customize your Sentry's stats and options and you're ready to go.
A full list of commands and options is available on the Citizens 2 Wiki
Configuration
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.
![]()


-
View User Profile
-
Send Message
Posted Apr 18, 2014@mcmonkey4eva
THANK YOU SO MUCH
-
View User Profile
-
Send Message
Posted Apr 18, 2014Well I am having issues with this plugin on my 1.7.5 server. Whenever I try to make an npc into a sentry with /trait sentry it tells me to report this error: java.lang.noclassdeffounderror: net/minecraft/server/v1_7_r1/packet I would really appreciate it if anyone could help out!
-
View User Profile
-
Send Message
Posted Apr 15, 2014@Drazhar753
There is not currently a way to do that. It wouldn't even be remotely useful for 99.99% of servers... pretty much only your own server could use that option. Not even worth a command.
Regardless, I can't let an easily added feature/fix be ignored, even though I'm mostly just maintaining Sentry while Jrbudda continues being all disappear-y, so I've added a hidden option for it, just for you. In the latest dev build of Sentry ( http://ci.citizensnpcs.co/job/Sentry/11/ for 1.7.8) (and in future releases), there is now a line in your Citizens saves.yml file under 'sentry' for each NPC that says "IgnoreLOS: false" -> stop your server, open the saves.yml and edit that from 'false' to 'true' for each NPC you want to entirely disregard the line-of-sight sanity check, then restart the server. Use at your own risk.
-
View User Profile
-
Send Message
Posted Apr 15, 2014@mcmonkey4eva
Not so much mobs, but players, we have airships/ships on our server, and we want Sentry NPCs such as fire mages to fire at the hulls of the ships even with lack of line of sight to the player, otherwise it's easy to hide within the ship and not be fired upon.
Edit: of course, this isn't ideal for all the npcs, just for a few such as pirates that are scattered about.
-
View User Profile
-
Send Message
Posted Apr 13, 2014@Drazhar753
You want... your Sentry NPCs to shoot at mobs... that it can't hit? Er, why exactly?
@Wingeddwarf
Go to http://wiki.citizensnpcs.co/Sentry and in the Updates box, find the Sentry version built for the version of Minecraft/CraftBukkit you're using.
-
View User Profile
-
Send Message
Posted Apr 13, 2014@baksovic111
I have this to
-
View User Profile
-
Send Message
Posted Apr 13, 2014@mcmonkey4eva
Hi is there a way to set for specific sentries to ignore line of sight? That is, shoot targets that are within their range but out of line of sight.
-
View User Profile
-
Send Message
Posted Apr 6, 2014Is it just me or is mounted sentries path broken? Sentries go apeshit if I try making a path (or don't move at all if I select the mount).
Using latest dev build.
-
View User Profile
-
Send Message
Posted Apr 5, 2014hi i updated all my sentry,bukkit and citezen's to the latest version but the only thing wrong is that all my npc's cant fight each other or myself
-
View User Profile
-
Send Message
Posted Apr 2, 2014@mcmonkey4eva
Thanks, I was looking for the newest version for 1.7.2 but none of the combinations work so I hope these do.
I wish I could update to 1.7.5 but I'm pretty sure a lot of my plugins would break.
-
View User Profile
-
Send Message
Posted Apr 2, 2014@xCaster1
Update to the latest Sentry dev build on the wiki - http://wiki.citizensnpcs.co/Sentry ... and latest Bukkit dev build as well.
@PaulDerby
You're running Citizens early build for 1.7.2 + Sentry later build for 1.72, which are incompatible.
Rather than trying to find all the right builds, I recommend you update to the latest 1.7.5 dev builds of Bukkit, Sentry, and Citizens.
If you can't do that, update to this version of Citizens: http://ci.citizensnpcs.co/job/Citizens2/1098/ (Citizens final dev build for v1.7.2), and this version of Sentry: http://ci.citizensnpcs.co/job/Sentry/7/ (Sentry final dev build for v1.7.2), and the final CraftBukkit v1.7.2 dev build as well.
-
View User Profile
-
Send Message
Posted Apr 2, 2014Everything seems to be working but whenever someone attacks an NPC it spits this out in console.
02.04 15:31:17 [Server] INFO at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:617) [craftbukkit_dev_3024.jar:git-Bukkit-1.7.2-R0.3-2-g85f5776-b3024jnks] 02.04 15:31:17 [Server] INFO at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java:457) [craftbukkit_dev_3024.jar:git-Bukkit-1.7.2-R0.3-2-g85f5776-b3024jnks] 02.04 15:31:17 [Server] INFO at net.minecraft.server.v1_7_R1.MinecraftServer.t(MinecraftServer.java:545) [craftbukkit_dev_3024.jar:git-Bukkit-1.7.2-R0.3-2-g85f5776-b3024jnks] 02.04 15:31:17 [Server] INFO at net.minecraft.server.v1_7_R1.DedicatedServer.u(DedicatedServer.java:250) [craftbukkit_dev_3024.jar:git-Bukkit-1.7.2-R0.3-2-g85f5776-b3024jnks] 02.04 15:31:17 [Server] INFO at net.minecraft.server.v1_7_R1.MinecraftServer.u(MinecraftServer.java:587) [craftbukkit_dev_3024.jar:git-Bukkit-1.7.2-R0.3-2-g85f5776-b3024jnks] 02.04 15:31:17 [Server] INFO at org.bukkit.craftbukkit.v1_7_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:345) [craftbukkit_dev_3024.jar:git-Bukkit-1.7.2-R0.3-2-g85f5776-b3024jnks] 02.04 15:31:17 [Server] INFO at org.bukkit.craftbukkit.v1_7_R1.scheduler.CraftTask.run(CraftTask.java:53) [craftbukkit_dev_3024.jar:git-Bukkit-1.7.2-R0.3-2-g85f5776-b3024jnks] 02.04 15:31:17 [Server] INFO at net.aufdemrand.sentry.SentryInstance$SentryLogic.run(SentryInstance.java:1420) [?:?] 02.04 15:31:17 [Server] INFO java.lang.NoSuchMethodError: net.citizensnpcs.util.NMS.sendPacketsNearby(Lorg/bukkit/Location;[Lnet/minecraft/server/v1_7_R1/Packet;)V 02.04 15:31:17 [Server] WARN Task #108 for Sentry v1.8.0 generated an exception 02.04 15:31:14 [Server] INFO Using inbuilt NmsBlock for this version. 02.04 15:31:13 [Server] INFO postAttach added goblin aka goblin to 36850c2a-8ee5-4606-a63d-2d12d6d990a2 aka Wilderness.
-
View User Profile
-
Send Message
Posted Apr 2, 201402.04 18:25:05 [Server] WARN ... 26 more 02.04 18:25:05 [Server] WARN at java.lang.ClassLoader.loadClass(ClassLoader.java:357) 02.04 18:25:05 [Server] WARN at java.lang.ClassLoader.loadClass(ClassLoader.java:424) 02.04 18:25:05 [Server] WARN at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:62) 02.04 18:25:05 [Server] WARN at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:67) 02.04 18:25:05 [Server] WARN Caused by: java.lang.ClassNotFoundException: net.minecraft.server.v1_7_R2.Packet 02.04 18:25:05 [Server] WARN at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:617) 02.04 18:25:05 [Server] WARN at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java:457) 02.04 18:25:05 [Server] WARN at net.minecraft.server.v1_7_R1.MinecraftServer.t(MinecraftServer.java:545) 02.04 18:25:05 [Server] WARN at net.minecraft.server.v1_7_R1.DedicatedServer.u(DedicatedServer.java:250) 02.04 18:25:05 [Server] WARN at net.minecraft.server.v1_7_R1.MinecraftServer.u(MinecraftServer.java:655) 02.04 18:25:05 [Server] WARN at net.minecraft.server.v1_7_R1.ServerConnection.c(SourceFile:134) 02.04 18:25:05 [Server] WARN at net.minecraft.server.v1_7_R1.NetworkManager.a(NetworkManager.java:146) 02.04 18:25:05 [Server] WARN at net.minecraft.server.v1_7_R1.PacketPlayInChat.handle(PacketPlayInChat.java:47) 02.04 18:25:05 [Server] WARN at net.minecraft.server.v1_7_R1.PacketPlayInChat.a(PacketPlayInChat.java:28) 02.04 18:25:05 [Server] WARN at net.minecraft.server.v1_7_R1.PlayerConnection.a(PlayerConnection.java:814) 02.04 18:25:05 [Server] WARN at net.minecraft.server.v1_7_R1.PlayerConnection.handleCommand(PlayerConnection.java:932) 02.04 18:25:05 [Server] WARN at org.bukkit.craftbukkit.v1_7_R1.CraftServer.dispatchCommand(CraftServer.java:542) 02.04 18:25:05 [Server] WARN at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:196) 02.04 18:25:05 [Server] WARN at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) 02.04 18:25:05 [Server] WARN at net.citizensnpcs.Citizens.onCommand(Citizens.java:246) 02.04 18:25:05 [Server] WARN at net.citizensnpcs.api.command.CommandManager.executeSafe(CommandManager.java:177) 02.04 18:25:05 [Server] WARN at net.citizensnpcs.api.command.CommandManager.execute(CommandManager.java:90) 02.04 18:25:05 [Server] WARN at net.citizensnpcs.api.command.CommandManager.executeMethod(CommandManager.java:153) 02.04 18:25:05 [Server] WARN at java.lang.reflect.Method.invoke(Method.java:606) 02.04 18:25:05 [Server] WARN at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 02.04 18:25:05 [Server] WARN at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 02.04 18:25:05 [Server] WARN at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 02.04 18:25:05 [Server] WARN at net.citizensnpcs.commands.NPCCommands.create(NPCCommands.java:370) 02.04 18:25:05 [Server] WARN at net.citizensnpcs.api.npc.AbstractNPC.addTrait(AbstractNPC.java:117) 02.04 18:25:05 [Server] WARN at net.aufdemrand.sentry.SentryTrait.onSpawn(SentryTrait.java:115) 02.04 18:25:05 [Server] WARN at net.aufdemrand.sentry.SentryTrait.ensureInst(SentryTrait.java:133) 02.04 18:25:05 [Server] WARN java.lang.NoClassDefFoundError: net/minecraft/server/v1_7_R2/Packet
-
View User Profile
-
Send Message
Posted Apr 1, 2014@Blamo27
Are you sure you have targets set up properly? Did you wait a minute or so and allow it to retaliate once or twice so it loads up and starts working properly?
-
View User Profile
-
Send Message
Posted Apr 1, 2014The sentry configured to attack on a range automatically doesn't work x_x
-
View User Profile
-
Send Message
Posted Mar 31, 2014@baksovic111
Update to the latest Sentry dev build on the wiki - http://wiki.citizensnpcs.co/Sentry ... and latest Bukkit dev build as well.
-
View User Profile
-
Send Message
Posted Mar 31, 2014[04:25:37] [Server thread/INFO]: [0;32;1mreloaded Sentry/config.yml[m [04:25:41] [Server thread/WARN]: java.lang.NoClassDefFoundError: net/minecraft/server/v1_7_R1/Packet [04:25:41] [Server thread/WARN]: at net.aufdemrand.sentry.SentryTrait.ensureInst(SentryTrait.java:132) [04:25:41] [Server thread/WARN]: at net.aufdemrand.sentry.SentryTrait.onSpawn(SentryTrait.java:114) [04:25:41] [Server thread/WARN]: at net.citizensnpcs.api.npc.AbstractNPC.addTrait(AbstractNPC.java:111) [04:25:41] [Server thread/WARN]: at net.citizensnpcs.api.npc.AbstractNPC.addTrait(AbstractNPC.java:90) [04:25:41] [Server thread/WARN]: at net.citizensnpcs.commands.TraitCommands.addTrait(TraitCommands.java:59) [04:25:41] [Server thread/WARN]: at net.citizensnpcs.commands.TraitCommands.toggle(TraitCommands.java:152) [04:25:41] [Server thread/WARN]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [04:25:41] [Server thread/WARN]: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [04:25:41] [Server thread/WARN]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [04:25:41] [Server thread/WARN]: at java.lang.reflect.Method.invoke(Method.java:483) [04:25:41] [Server thread/WARN]: at net.citizensnpcs.api.command.CommandManager.executeMethod(CommandManager.java:153) [04:25:41] [Server thread/WARN]: at net.citizensnpcs.api.command.CommandManager.execute(CommandManager.java:90) [04:25:41] [Server thread/WARN]: at net.citizensnpcs.api.command.CommandManager.executeSafe(CommandManager.java:177) [04:25:41] [Server thread/WARN]: at net.citizensnpcs.Citizens.onCommand(Citizens.java:236) [04:25:41] [Server thread/WARN]: at org.bukkit.command.PluginCommand.execute(PluginCommand.java:50) [04:25:41] [Server thread/WARN]: at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:192) [04:25:41] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_7_R2.CraftServer.dispatchCommand(CraftServer.java:719) [04:25:41] [Server thread/WARN]: at net.minecraft.server.v1_7_R2.PlayerConnection.handleCommand(PlayerConnection.java:984) [04:25:41] [Server thread/WARN]: at net.minecraft.server.v1_7_R2.PlayerConnection.a(PlayerConnection.java:829) [04:25:41] [Server thread/WARN]: at net.minecraft.server.v1_7_R2.PacketPlayInChat.a(PacketPlayInChat.java:28) [04:25:41] [Server thread/WARN]: at net.minecraft.server.v1_7_R2.PacketPlayInChat.handle(PacketPlayInChat.java:65) [04:25:41] [Server thread/WARN]: at net.minecraft.server.v1_7_R2.NetworkManager.a(NetworkManager.java:148) [04:25:41] [Server thread/WARN]: at net.minecraft.server.v1_7_R2.ServerConnection.c(ServerConnection.java:77) [04:25:41] [Server thread/WARN]: at net.minecraft.server.v1_7_R2.MinecraftServer.v(MinecraftServer.java:703) [04:25:41] [Server thread/WARN]: at net.minecraft.server.v1_7_R2.DedicatedServer.v(DedicatedServer.java:273) [04:25:41] [Server thread/WARN]: at net.minecraft.server.v1_7_R2.MinecraftServer.u(MinecraftServer.java:566) [04:25:41] [Server thread/WARN]: at net.minecraft.server.v1_7_R2.MinecraftServer.run(MinecraftServer.java:472) [04:25:41] [Server thread/WARN]: at net.minecraft.server.v1_7_R2.ThreadServerApplication.run(SourceFile:618) [04:25:41] [Server thread/WARN]: Caused by: java.lang.ClassNotFoundException: net.minecraft.server.v1_7_R1.Packet [04:25:41] [Server thread/WARN]: at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:75) [04:25:41] [Server thread/WARN]: at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:70) [04:25:41] [Server thread/WARN]: at java.lang.ClassLoader.loadClass(ClassLoader.java:424) [04:25:41] [Server thread/WARN]: at java.lang.ClassLoader.loadClass(ClassLoader.java:357) [04:25:41] [Server thread/WARN]: ... 28 more [04:25:46] [Server thread/WARN]: java.lang.NoClassDefFoundError: net/minecraft/server/v1_7_R1/Packet [04:25:46] [Server thread/WARN]: at net.aufdemrand.sentry.SentryTrait.ensureInst(SentryTrait.java:132) [04:25:46] [Server thread/WARN]: at net.aufdemrand.sentry.SentryTrait.onSpawn(SentryTrait.java:114) [04:25:46] [Server thread/WARN]: at net.citizensnpcs.api.npc.AbstractNPC.addTrait(AbstractNPC.java:111) [04:25:46] [Server thread/WARN]: at net.citizensnpcs.api.npc.AbstractNPC.addTrait(AbstractNPC.java:90) [04:25:46] [Server thread/WARN]: at net.citizensnpcs.commands.TraitCommands.addTrait(TraitCommands.java:59) [04:25:46] [Server thread/WARN]: at net.citizensnpcs.commands.TraitCommands.toggle(TraitCommands.java:152) [04:25:46] [Server thread/WARN]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [04:25:46] [Server thread/WARN]: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [04:25:46] [Server thread/WARN]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [04:25:46] [Server thread/WARN]: at java.lang.reflect.Method.invoke(Method.java:483) [04:25:46] [Server thread/WARN]: at net.citizensnpcs.api.command.CommandManager.executeMethod(CommandManager.java:153) [04:25:46] [Server thread/WARN]: at net.citizensnpcs.api.command.CommandManager.execute(CommandManager.java:90) [04:25:46] [Server thread/WARN]: at net.citizensnpcs.api.command.CommandManager.executeSafe(CommandManager.java:177) [04:25:46] [Server thread/WARN]: at net.citizensnpcs.Citizens.onCommand(Citizens.java:236) [04:25:46] [Server thread/WARN]: at org.bukkit.command.PluginCommand.execute(PluginCommand.java:50) [04:25:46] [Server thread/WARN]: at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:192) [04:25:46] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_7_R2.CraftServer.dispatchCommand(CraftServer.java:719) [04:25:46] [Server thread/WARN]: at net.minecraft.server.v1_7_R2.PlayerConnection.handleCommand(PlayerConnection.java:984) [04:25:46] [Server thread/WARN]: at net.minecraft.server.v1_7_R2.PlayerConnection.a(PlayerConnection.java:829) [04:25:46] [Server thread/WARN]: at net.minecraft.server.v1_7_R2.PacketPlayInChat.a(PacketPlayInChat.java:28) [04:25:46] [Server thread/WARN]: at net.minecraft.server.v1_7_R2.PacketPlayInChat.handle(PacketPlayInChat.java:65) [04:25:46] [Server thread/WARN]: at net.minecraft.server.v1_7_R2.NetworkManager.a(NetworkManager.java:148) [04:25:46] [Server thread/WARN]: at net.minecraft.server.v1_7_R2.ServerConnection.c(ServerConnection.java:77) [04:25:46] [Server thread/WARN]: at net.minecraft.server.v1_7_R2.MinecraftServer.v(MinecraftServer.java:703) [04:25:46] [Server thread/WARN]: at net.minecraft.server.v1_7_R2.DedicatedServer.v(DedicatedServer.java:273) [04:25:46] [Server thread/WARN]: at net.minecraft.server.v1_7_R2.MinecraftServer.u(MinecraftServer.java:566) [04:25:46] [Server thread/WARN]: at net.minecraft.server.v1_7_R2.MinecraftServer.run(MinecraftServer.java:472) [04:25:46] [Server thread/WARN]: at net.minecraft.server.v1_7_R2.ThreadServerApplication.run(SourceFile:618) [04:25:46] [Server thread/WARN]: Caused by: java.lang.ClassNotFoundException: net.minecraft.server.v1_7_R1.Packet [04:25:46] [Server thread/WARN]: at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:75) [04:25:46] [Server thread/WARN]: at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:70) [04:25:46] [Server thread/WARN]: at java.lang.ClassLoader.loadClass(ClassLoader.java:424) [04:25:46] [Server thread/WARN]: at java.lang.ClassLoader.loadClass(ClassLoader.java:357) [04:25:46] [Server thread/WARN]: ... 28 more
-
View User Profile
-
Send Message
Posted Mar 31, 2014@joshworx
That would be a plugin issue.
A few common plugins that cause this:
- Things like WorldGuard which disable PvP in a region or globally (PvP is needed for Sentry)
- A restrictive permissions plugin.
... basically, if a normal player who just joined your server and didn't activate anything can't fight, neither can Sentry NPCs.
-
View User Profile
-
Send Message
Posted Mar 30, 2014Hey, old problem rose up again...
Sentries can't die, nor can they take or deal damage... Invincibility is disabled and everything, not sure if a plugin is breaking it or not, but I get no errors on the console or anything, so if you could look in to this for me, that would be great. I'm using the 1.7.5 version.
Thank you.
- joshworx
-
View User Profile
-
Send Message
Posted Mar 27, 2014@Matthiasiam
I assume you mean display name rather than lore... and Sentry doesn't save data in an incredibly complex / useful way... if you want better item handling for that, you'll probably need to set it up through Denizen -> http://wiki.citizensnpcs.co/Denizen