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 28, 2014@mcmonkey4eva
Hello,
I also got a problem on my Spigot server 1.7.2 when i'm doing /trait sentry on a selected NPC this is what i get on my console :
[14:59:53 WARN]: java.lang.NoClassDefFoundError: net/minecraft/server/v1_7_R1/World [14:59:53 WARN]: at net.aufdemrand.sentry.SentryTrait.ensureInst(SentryTrait.java:136) [14:59:53 WARN]: at net.aufdemrand.sentry.SentryTrait.onSpawn(SentryTrait.java:117) [14:59:53 WARN]: at net.citizensnpcs.api.npc.AbstractNPC.addTrait(AbstractNPC.java:111) [14:59:53 WARN]: at net.citizensnpcs.api.npc.AbstractNPC.addTrait(AbstractNPC.java:90) [14:59:53 WARN]: at net.citizensnpcs.commands.TraitCommands.addTrait(TraitCommands.java:59) [14:59:53 WARN]: at net.citizensnpcs.commands.TraitCommands.toggle(TraitCommands.java:152) [14:59:53 WARN]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [14:59:53 WARN]: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [14:59:53 WARN]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [14:59:53 WARN]: at java.lang.reflect.Method.invoke(Method.java:601) [14:59:53 WARN]: at net.citizensnpcs.api.command.CommandManager.executeMethod(CommandManager.java:153) [14:59:53 WARN]: at net.citizensnpcs.api.command.CommandManager.execute(CommandManager.java:90) [14:59:53 WARN]: at net.citizensnpcs.api.command.CommandManager.executeSafe(CommandManager.java:177) [14:59:53 WARN]: at net.citizensnpcs.Citizens.onCommand(Citizens.java:236) [14:59:53 WARN]: at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) [14:59:53 WARN]: at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:180) [14:59:53 WARN]: at org.bukkit.craftbukkit.v1_7_R2.CraftServer.dispatchCommand(CraftServer.java:719) [14:59:53 WARN]: at net.minecraft.server.v1_7_R2.PlayerConnection.handleCommand(PlayerConnection.java:984) [14:59:53 WARN]: at net.minecraft.server.v1_7_R2.PlayerConnection.a(PlayerConnection.java:829) [14:59:53 WARN]: at net.minecraft.server.v1_7_R2.PacketPlayInChat.a(PacketPlayInChat.java:28) [14:59:53 WARN]: at net.minecraft.server.v1_7_R2.PacketPlayInChat.handle(PacketPlayInChat.java:65) [14:59:53 WARN]: at net.minecraft.server.v1_7_R2.NetworkManager.a(NetworkManager.java:148) [14:59:53 WARN]: at net.minecraft.server.v1_7_R2.ServerConnection.c(ServerConnection.java:77) [14:59:53 WARN]: at net.minecraft.server.v1_7_R2.MinecraftServer.v(MinecraftServer.java:703) [14:59:53 WARN]: at net.minecraft.server.v1_7_R2.DedicatedServer.v(DedicatedServer.java:273) [14:59:53 WARN]: at net.minecraft.server.v1_7_R2.MinecraftServer.u(MinecraftServer.java:566) [14:59:53 WARN]: at net.minecraft.server.v1_7_R2.MinecraftServer.run(MinecraftServer.java:472) [14:59:53 WARN]: at net.minecraft.server.v1_7_R2.ThreadServerApplication.run(SourceFile:618) [14:59:53 WARN]: Caused by: java.lang.ClassNotFoundException: net.minecraft.server.v1_7_R1.World [14:59:53 WARN]: at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:67) [14:59:53 WARN]: at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:62) [14:59:53 WARN]: at java.lang.ClassLoader.loadClass(ClassLoader.java:423) [14:59:53 WARN]: at java.lang.ClassLoader.loadClass(ClassLoader.java:356) [14:59:53 WARN]: ... 28 more
I already tried with the v. 1.8.0 (12/10/13) and the v. 1.7.1 (11/07/1) but that's still not working..
Thanks :)
-
View User Profile
-
Send Message
Posted Apr 26, 2014@zaxary13
Find the appropriate Sentry version (That matches your minecraft version) on the wiki page here: http://wiki.citizensnpcs.co/Sentry in the 'Updates' box
Note that there isn't a 1.7.4 build because there is no 1.7.4 CraftBukkit build... it's impossible for you to be running a 1.7.4 server.
@jmoreira49
That's way too vague. Probably you just need to find a proper version too ^. If not, post details. What error message? Or, if not an error message, what happens?
-
View User Profile
-
Send Message
Posted Apr 26, 2014I have the same promplem it gives me an error when i do /trait sentry
-
View User Profile
-
Send Message
Posted Apr 26, 2014hie
i have a problem with sentry when i do /trait sentry im under spigot Can u help me?
-
View User Profile
-
Send Message
Posted Apr 26, 2014It is giving me an error saying java.lang.NoCLass Error plz help and create a update for 1.7.4
-
View User Profile
-
Send Message
Posted Apr 25, 2014@michaelboy13
You can do that with Denizen: http://wiki.citizensnpcs.co/Denizen
-
View User Profile
-
Send Message
Posted Apr 25, 2014Hey, I was wondering could you make a plugin where you right click an npc and it opens a menu like minplex has would be awsome
-
View User Profile
-
Send Message
Posted Apr 23, 2014@Gobyslayer
What part of "a new server, a really simple one" implied upload all 530 MegaBytes of your f*king server? Including old logs, crash reports, irrelevant side-worlds, a random 170 MB zip copy of your world (invalidly compressed / unreadable too), backup files, and several duplicate copies of plugins?
Luckily dropbox has a 'download as zip' button now so I don't have to murder you for not even bothering to zip it yourself. (Too lazy to figure out which files are relevant and download them one by one)
The first issue I notice is that *SENTRY DOES NOT EVEN FULLY LOAD* because you have an invalid special character (an imitation quote) on line 48 of the config (You were likely editing the config.yml in a misconfigured text editor)
After fixing that... I join the server and can't do anything because I spawned in the void. After finally creativing and escaping, I spent quite a while hunting for your freakin' spawn point. After finding it... the bug you mentioned does indeed occur.
So, now I updated the server to 1.7.9... and removed the crap left over from when you updated before then downdated, as if that wouldn't cause issues precisely like this.
And now, after re-updating to 1.7.9... they are shooting fine.
Conclusion: You are trying to run a server with zero technical experience of any form.
Recommendations: Watch for console errors, fix it when they say things like 'failed to load config'. Always stay up to date, definitely never update then downdate later. Learn how to follow basic instructions such as 'make a new server'. Learn how to zip files. Give your internet connection that can upload 600 MB of junk in five minutes to someone who will use it better. Lastly, learn how computers in general work.
EDIT: Also, learn patience. No need to send a second comment demanding a progress report less than an hour later.
-
View User Profile
-
Send Message
Posted Apr 23, 2014@mcmonkey4eva does it work?
-
View User Profile
-
Send Message
Posted Apr 23, 2014@mcmonkey4eva here is the file there are two sentries by the throne at spawn with bowshttps://www.dropbox.com/sh/l14gb2st4zcjt1r/bNKN0tlvxF if the link doesnt work you can copy and paste it into the url bar
-
View User Profile
-
Send Message
Posted Apr 23, 2014@mcmonkey4eva i will do as you asked expect it in about 5 to 10 minutes
-
View User Profile
-
Send Message
Posted Apr 23, 2014@Gobyslayer
I'd need something I can run and control, not just to wander onto your server and watch.
-
View User Profile
-
Send Message
Posted Apr 23, 2014@mcmonkey4eva i tried to decrease range for my sentries and i have them with the states i want i have them with a bow and they are idle so i put a monster for them to attack and they look at it aim at it and shoot arrows but the arrows dont go anywhere they just float where the sentry is until he is moved so he is targeting the target creature he just cant do it. i saw somthing about projectile range from the wiki yet. i havent been able to find that in the files. as for the download i could let you come on my server i have a sentry doing it now
-
View User Profile
-
Send Message
Posted Apr 23, 2014@mblanchet75
Available here: https://github.com/mcmonkey4eva/Sentry
@Gobyslayer
I could barely understand what you asked... the best I can interpret is that arrows shot by Sentry NPCs go straight down... which only ever happens on my server if an enemy is underneath them. If that's happening without something below... it's something else going wrong on your server. If I can't replicate the issue, I can't fix it.
If you can, maybe make a new server, a really simple one with just Citizens and Sentry and an empty world, and get it so that issue occurs. Then, save the server files, put them in a .zip file and upload it somewhere I can download it from (dropbox or whatever), so I can open the server and see it happening myself + run diagnostics.
-
View User Profile
-
Send Message
Posted Apr 23, 2014@mcmonkey4eva i know ive been bothering you alot but have you found a fix to the problem of ranged sentries not working? i havent been able to fix it
-
View User Profile
-
Send Message
Posted Apr 23, 2014Where I can find the source code of Sentry? If it is available? I want to custom it for my server if it is possible.
-
View User Profile
-
Send Message
Posted Apr 23, 2014@Zach5928
You seem to be multiply confused. There is not and never has been a "Sentry v2.0.0"
Also, you're running a MineCraft 1.7.9 dev release of Sentry on a MineCraft 1.7.5 server... find the appropriate Sentry version on the wiki at http://wiki.citizensnpcs.co/Sentry (in the 'Updates' box)
-
View User Profile
-
Send Message
Posted Apr 23, 201423.04 14:08:13 [Server] INFO [14:08:13 WARN]: at net.minecraft.server.v1_7_R2.MinecraftServer.run(MinecraftServer.java:459) 23.04 14:08:13 [Server] INFO [14:08:13 WARN]: at net.minecraft.server.v1_7_R2.MinecraftServer.u(MinecraftServer.java:548) 23.04 14:08:13 [Server] INFO [14:08:13 WARN]: at net.minecraft.server.v1_7_R2.DedicatedServer.v(DedicatedServer.java:250) 23.04 14:08:13 [Server] INFO [14:08:13 WARN]: at net.minecraft.server.v1_7_R2.MinecraftServer.v(MinecraftServer.java:657) 23.04 14:08:13 [Server] INFO [14:08:13 WARN]: at net.minecraft.server.v1_7_R2.ServerConnection.c(SourceFile:134) 23.04 14:08:13 [Server] INFO [14:08:13 WARN]: at net.minecraft.server.v1_7_R2.NetworkManager.a(NetworkManager.java:147) 23.04 14:08:13 [Server] INFO [14:08:13 WARN]: at net.minecraft.server.v1_7_R2.PacketPlayInChat.handle(PacketPlayInChat.java:47) 23.04 14:08:13 [Server] INFO [14:08:13 WARN]: at net.minecraft.server.v1_7_R2.PacketPlayInChat.a(PacketPlayInChat.java:28) 23.04 14:08:13 [Server] INFO [14:08:13 WARN]: at com.bergerkiller.bukkit.common.internal.network.CommonPacketHandler$CommonPlayerConnection.a(CommonPacketHandler.java:244) 23.04 14:08:13 [Server] INFO [14:08:13 WARN]: at net.minecraft.server.v1_7_R2.PlayerConnection.a(PlayerConnection.java:814) 23.04 14:08:13 [Server] INFO [14:08:13 WARN]: at net.minecraft.server.v1_7_R2.PlayerConnection.handleCommand(PlayerConnection.java:952) 23.04 14:08:13 [Server] INFO [14:08:13 WARN]: at org.bukkit.craftbukkit.v1_7_R2.CraftServer.dispatchCommand(CraftServer.java:696) 23.04 14:08:13 [Server] INFO [14:08:13 WARN]: at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:180) 23.04 14:08:13 [Server] INFO [14:08:13 WARN]: at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) 23.04 14:08:13 [Server] INFO [14:08:13 WARN]: at net.citizensnpcs.Citizens.onCommand(Citizens.java:236) 23.04 14:08:13 [Server] INFO [14:08:13 WARN]: at net.citizensnpcs.api.command.CommandManager.executeSafe(CommandManager.java:177) 23.04 14:08:13 [Server] INFO [14:08:13 WARN]: at net.citizensnpcs.api.command.CommandManager.execute(CommandManager.java:90) 23.04 14:08:13 [Server] INFO [14:08:13 WARN]: at net.citizensnpcs.api.command.CommandManager.executeMethod(CommandManager.java:153) 23.04 14:08:13 [Server] INFO [14:08:13 WARN]: at java.lang.reflect.Method.invoke(Method.java:606) 23.04 14:08:13 [Server] INFO [14:08:13 WARN]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 23.04 14:08:13 [Server] INFO [14:08:13 WARN]: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 23.04 14:08:13 [Server] INFO [14:08:13 WARN]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 23.04 14:08:13 [Server] INFO [14:08:13 WARN]: at net.citizensnpcs.commands.TraitCommands.toggle(TraitCommands.java:152) 23.04 14:08:13 [Server] INFO [14:08:13 WARN]: at net.citizensnpcs.commands.TraitCommands.addTrait(TraitCommands.java:59) 23.04 14:08:13 [Server] INFO [14:08:13 WARN]: at net.citizensnpcs.api.npc.AbstractNPC.addTrait(AbstractNPC.java:90) 23.04 14:08:13 [Server] INFO [14:08:13 WARN]: at net.citizensnpcs.api.npc.AbstractNPC.addTrait(AbstractNPC.java:111) 23.04 14:08:13 [Server] INFO [14:08:13 WARN]: at net.aufdemrand.sentry.SentryTrait.onSpawn(SentryTrait.java:116) 23.04 14:08:13 [Server] INFO [14:08:13 WARN]: at net.aufdemrand.sentry.SentryTrait.ensureInst(SentryTrait.java:134) 23.04 14:08:13 [Server] INFO [14:08:13 WARN]: java.lang.NoClassDefFoundError: net/minecraft/server/v1_7_R3/World
This is what I get in console every time I start the server or when i give an NPC the trait "Sentry". Can someone please help? I am also using the latest build "Sentry v2.0.0"
-
View User Profile
-
Send Message
Posted Apr 21, 2014@NoahWL1
Freakin'... why doesn't anybody read around here.
Yet again... updated builds are on the wiki: http://wiki.citizensnpcs.co/Sentry
Find the build that matches your minecraft version in the 'Updates' box on that page.
-
View User Profile
-
Send Message
Posted Apr 21, 2014@stalkerzombie Yeah I'm getting the same problem. Seems to not be updated. Really looking forward to using this plugin!