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 Jul 22, 2014@mcmonkey4eva
I update bukkit, citizens 2 and sentry to 1.7.10 as well as the mojang 1.7.10 server file still have the same problem
-
View User Profile
-
Send Message
Posted Jul 22, 2014@KnightcraftRPGServer
You're using a version of Sentry incompatible with the version of Denizen you have.
Update your Sentry at http://wiki.citizensnpcs.co/Sentry#Updates to 1.8.2 build 2
-
View User Profile
-
Send Message
Posted Jul 22, 2014I get this error when a sentry is killed, also despite setting it not to, they drop their loot.
Start at bottom
-
View User Profile
-
Send Message
Posted Jul 21, 2014@thor54
You updated Bukkit to 1.7.10 but not Sentry. http://wiki.citizensnpcs.co/Sentry#Updates Get Sentry 1.8.2 Build 3 for 1.7.10 compatibility.
-
View User Profile
-
Send Message
Posted Jul 20, 2014hi I am having problems since the 1.7.10 udate it can not load my sentry npc;s i deleted all citizen file all citizen file u dated to new file and i create and sentry npc and i cant equip it inless i do a manul select and then it doesn't safe the sentry next time i reboot the server its gone. and i keep getting errors on my sever console and this is in the log when i try to set trait: [20:55:32] [Server thread/INFO]: thorfinns[/25.39.180.113:56872] logged in with entity id 216 at ([world] 1274.9688067219029, 67.0, -1003.0314882685009) [20:56:00] [Server thread/INFO]: [WorldEdit] Using external NmsBlock for this version: CBXNmsBlock_1710 [20:57:14] [Server thread/INFO]: thorfinns issued server command: /npc select 0 [20:57:27] [Server thread/INFO]: thorfinns issued server command: /npc trait senrty [20:57:42] [Server thread/INFO]: thorfinns issued server command: /npc help [20:58:39] [Server thread/INFO]: thorfinns issued server command: /trait sentry [20:58:39] [Server thread/WARN]: java.lang.NoClassDefFoundError: net/minecraft/server/v1_7_R3/Packet [20:58:39] [Server thread/WARN]: at net.aufdemrand.sentry.SentryTrait.ensureInst(SentryTrait.java:134) [20:58:39] [Server thread/WARN]: at net.aufdemrand.sentry.SentryTrait.onSpawn(SentryTrait.java:116) [20:58:39] [Server thread/WARN]: at net.citizensnpcs.api.npc.AbstractNPC.addTrait(AbstractNPC.java:111) [20:58:39] [Server thread/WARN]: at net.citizensnpcs.api.npc.AbstractNPC.addTrait(AbstractNPC.java:90) [20:58:39] [Server thread/WARN]: at net.citizensnpcs.commands.TraitCommands.addTrait(TraitCommands.java:59) [20:58:39] [Server thread/WARN]: at net.citizensnpcs.commands.TraitCommands.toggle(TraitCommands.java:152) [20:58:39] [Server thread/WARN]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [20:58:39] [Server thread/WARN]: at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [20:58:39] [Server thread/WARN]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [20:58:39] [Server thread/WARN]: at java.lang.reflect.Method.invoke(Unknown Source) [20:58:39] [Server thread/WARN]: at net.citizensnpcs.api.command.CommandManager.executeMethod(CommandManager.java:154) [20:58:39] [Server thread/WARN]: at net.citizensnpcs.api.command.CommandManager.execute(CommandManager.java:90) [20:58:39] [Server thread/WARN]: at net.citizensnpcs.api.command.CommandManager.executeSafe(CommandManager.java:178) [20:58:39] [Server thread/WARN]: at net.citizensnpcs.Citizens.onCommand(Citizens.java:236) [20:58:39] [Server thread/WARN]: at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) [20:58:39] [Server thread/WARN]: at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:180) [20:58:39] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_7_R4.CraftServer.dispatchCommand(CraftServer.java:740) [20:58:39] [Server thread/WARN]: at net.minecraft.server.v1_7_R4.PlayerConnection.handleCommand(PlayerConnection.java:957) [20:58:39] [Server thread/WARN]: at net.minecraft.server.v1_7_R4.PlayerConnection.a(PlayerConnection.java:818) [20:58:39] [Server thread/WARN]: at net.minecraft.server.v1_7_R4.PacketPlayInChat.a(PacketPlayInChat.java:28) [20:58:39] [Server thread/WARN]: at net.minecraft.server.v1_7_R4.PacketPlayInChat.handle(PacketPlayInChat.java:47) [20:58:39] [Server thread/WARN]: at net.minecraft.server.v1_7_R4.NetworkManager.a(NetworkManager.java:157) [20:58:39] [Server thread/WARN]: at net.minecraft.server.v1_7_R4.ServerConnection.c(SourceFile:134) [20:58:39] [Server thread/WARN]: at net.minecraft.server.v1_7_R4.MinecraftServer.v(MinecraftServer.java:667) [20:58:39] [Server thread/WARN]: at net.minecraft.server.v1_7_R4.DedicatedServer.v(DedicatedServer.java:258) [20:58:39] [Server thread/WARN]: at net.minecraft.server.v1_7_R4.MinecraftServer.u(MinecraftServer.java:558) [20:58:39] [Server thread/WARN]: at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:469) [20:58:39] [Server thread/WARN]: at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628) [20:58:39] [Server thread/WARN]: Caused by: java.lang.ClassNotFoundException: net.minecraft.server.v1_7_R3.Packet [20:58:39] [Server thread/WARN]: at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:67) [20:58:39] [Server thread/WARN]: at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:62) [20:58:39] [Server thread/WARN]: at java.lang.ClassLoader.loadClass(Unknown Source) [20:58:39] [Server thread/WARN]: at java.lang.ClassLoader.loadClass(Unknown Source) [20:58:39] [Server thread/WARN]: ... 28 more
-
View User Profile
-
Send Message
Posted Jul 18, 2014@Mexbotdude
For some reason, Sentry forces combat mode for mods. Fixing that requires either a code fix or switching to a different system, like dSentry.
If you do something like "/npc sound -x" it'll error and show you the full help output. Which might help you understand.
-
View User Profile
-
Send Message
Posted Jul 18, 2014@mcmonkey4eva
ok thanks
I would like to ask you if there is any way to make skeletons and wither skeletons to attack me without shooting me. Im equipped a Wither Skeleton with a sword but he still attacks me bows and he won't walk to attack me
P.D Do you know how to use the new citizens commands /npc sound and /npc effect. I need them but I can't find any tutorials
-
View User Profile
-
Send Message
Posted Jul 16, 2014@Mexbotdude
Not natively with Sentry, but if you add something like Denizen ( http://wiki.citizensnpcs.co/Denizen ) you could use that to accomplish it.
-
View User Profile
-
Send Message
Posted Jul 16, 2014Is there any way to make sentries make damage with effects?
for example:
I make a npc with type spider and when this sentry hit me, I get poisoned
-
View User Profile
-
Send Message
Posted Jul 16, 2014@Homer04
... What. Can you please clarify, or have a more English-experienced member of your server's staff post the question?
-
View User Profile
-
Send Message
Posted Jul 16, 2014i make it and icant make the command what should i do when i make no thing come like i wasnt rite and thing why
-
View User Profile
-
Send Message
Posted Jul 12, 2014@tdbulldog
Add target 'event:pvp' and give it a sword.
-
View User Profile
-
Send Message
Posted Jul 12, 2014I want the Sentry to be in an area, and watch for players engaging in PVP, and if the players are, quickly run over, attack to kill both players, then after they PVP'ers dead, return to their post. Is this possible?
-
View User Profile
-
Send Message
Posted Jul 11, 2014@crazylemon97
Post the error that showed in your console?
-
View User Profile
-
Send Message
Posted Jul 11, 2014http://prntscr.com/41lb6f how to fix this please help
-
View User Profile
-
Send Message
Posted Jul 5, 2014@mcmonkey4eva
I removed the trait health from the npc but it still won't work and the sentry respawns again after killing him. The only way to stop this is when I do /sentry respawn 0
-
View User Profile
-
Send Message
Posted Jul 4, 2014@Mexbotdude
Select the NPC and /trait health
should remove Denizen's respawn handling entirely.
(Unless you have a script doing it. In which case, remove the script)
-
View User Profile
-
Send Message
Posted Jul 4, 2014@mcmonkey4eva
It is Denizen, but is there any way to disable it?
-
View User Profile
-
Send Message
Posted Jul 4, 2014@Mexbotdude
Do you possibly have:
- another plugin that could force a respawn
- another Citizens plugin like Denizen that might respawn the NPC (EG, Denizen's health trait)
Also, did you use "/sentry info" to confirm the respawn delay actually got set?
-
View User Profile
-
Send Message
Posted Jul 4, 2014I Have a problem with the 1.8.2 version
When I make an npc and add to him /trait sentry and I type sentry spawn everything works fine. But when I type /sentry respawn (example 60) the respawn delay should be in 60 seconds. But instead of this after I kill the npc he automatically respawns again without using the 60 secs delay.
Hope someone could help me :|