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 Aug 17, 2013Error:
20:55:46 [SEVERE] java.lang.NoSuchMethodError: net.citizensnpcs.api.npc.NPC.teleport(Lorg/bukkit/Location;Lorg/bukkit/event/player/PlayerTeleportEvent$TeleportCause;)V 20:55:46 [SEVERE] at net.aufdemrand.sentry.SentryInstance.initialize(SentryInstance.java:990) 20:55:46 [SEVERE] at net.aufdemrand.sentry.SentryTrait.onSpawn(SentryTrait.java:128) 20:55:46 [SEVERE] at net.citizensnpcs.api.npc.AbstractNPC.addTrait(AbstractNPC.java:71) 20:55:46 [SEVERE] at net.citizensnpcs.commands.NPCCommands.create(NPCCommands.java:355) 20:55:46 [SEVERE] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 20:55:46 [SEVERE] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 20:55:46 [SEVERE] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 20:55:46 [SEVERE] at java.lang.reflect.Method.invoke(Unknown Source) 20:55:46 [SEVERE] at net.citizensnpcs.api.command.CommandManager.executeMethod(CommandManager.java:131) 20:55:46 [SEVERE] at net.citizensnpcs.api.command.CommandManager.execute(CommandManager.java:86) 20:55:46 [SEVERE] at net.citizensnpcs.api.command.CommandManager.executeSafe(CommandManager.java:155) 20:55:46 [SEVERE] at net.citizensnpcs.Citizens.onCommand(Citizens.java:214) 20:55:46 [SEVERE] at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) 20:55:46 [SEVERE] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:192) 20:55:46 [SEVERE] at org.bukkit.craftbukkit.v1_6_R2.CraftServer.dispatchCommand(CraftServer.java:527) 20:55:46 [SEVERE] at net.minecraft.server.v1_6_R2.PlayerConnection.handleCommand(PlayerConnection.java:979) 20:55:46 [SEVERE] at net.minecraft.server.v1_6_R2.PlayerConnection.chat(PlayerConnection.java:890) 20:55:46 [SEVERE] at net.minecraft.server.v1_6_R2.PlayerConnection.a(PlayerConnection.java:837) 20:55:46 [SEVERE] at net.minecraft.server.v1_6_R2.Packet3Chat.handle(SourceFile:49) 20:55:46 [SEVERE] at org.spigotmc.netty.NettyNetworkManager.b(NettyNetworkManager.java:230) 20:55:46 [SEVERE] at net.minecraft.server.v1_6_R2.PlayerConnection.e(PlayerConnection.java:116) 20:55:46 [SEVERE] at net.minecraft.server.v1_6_R2.ServerConnection.b(SourceFile:37) 20:55:46 [SEVERE] at org.spigotmc.netty.NettyServerConnection.b(NettyServerConnection.java:125) 20:55:46 [SEVERE] at net.minecraft.server.v1_6_R2.MinecraftServer.t(MinecraftServer.java:592) 20:55:46 [SEVERE] at net.minecraft.server.v1_6_R2.DedicatedServer.t(DedicatedServer.java:239) 20:55:46 [SEVERE] at net.minecraft.server.v1_6_R2.MinecraftServer.s(MinecraftServer.java:481) 20:55:46 [SEVERE] at net.minecraft.server.v1_6_R2.MinecraftServer.run(MinecraftServer.java:413) 20:55:46 [SEVERE] at net.minecraft.server.v1_6_R2.ThreadServerApplication.run(SourceFile:582)
-
View User Profile
-
Send Message
Posted Aug 16, 2013@CommodoreAlpha
Actually there's a secret setting on each sentry in the saves.yml called 'Weight' that affects how much the Sentry is knocked back... I just never hooked it up to a command cause I never really tested it, maybe give that a shot and let me know how well it works and I'll add in a command to edit it.
-
View User Profile
-
Send Message
Posted Aug 16, 2013Since you can edit the knockback resistance of entities via NBT tags (a recent 1.6 addition), would it be possible to have this attribute editable per sentry?
-
View User Profile
-
Send Message
Posted Aug 15, 2013Hi, Your plugin is really awesome, but my Sentry is not taking any damage from mobs or players. It takes damage from lava, and from fire sometimes. Please help me with this, the sentry is not invincible and has 20 health and 4 armor.
Thanks for your plugin :)
The plugins i use: Multiworld Plugman NoCheat+ WorldEdit Uberenchant FireworkArrows VoxelSniper DiabloDrops CustomEnchantments CommandPoints ColoredSigns StarterKit Backup Lores Vault PlayerHeads PermissionsEx EchoPet WorldGuard CommandPointsMunificent InfiniteKits ProtectionStones Phatloots Shopkeepers DisugiseCraft MasterPromote RestockIt ChestShop ClearLagg RoyalAuth Mcmmo Essentials Scroll Teleportation Citizens ServerSigns EssentialsSpawn SetRankPex Denizens Sentry ( :D ) EssentialsChat Builder
-
View User Profile
-
Send Message
Posted Aug 15, 2013@Abdulkawi
Updating to the latest citizens should fix that issue for Sentry.
-
View User Profile
-
Send Message
Posted Aug 15, 2013@jrbudda I'm having the same problem too,
Do you think you will be able to do what is suggested in the comments @ https://bukkit.atlassian.net/browse/BUKKIT-4634 by Mick Monkey.
I would be happy to test it.
-
View User Profile
-
Send Message
Posted Aug 14, 2013@Myrkwell
Try systematically removing your other plugins, one of them has to be causing the conflict.
-
View User Profile
-
Send Message
Posted Aug 14, 2013I'm at a loss. I cannot get my sentries to damage mobs. I've triple checked all the setup commands I used and when I spawn a mob next to the sentry I see it's status as IsRetaliating and the mob is properly targeted and the sentry chases the mob around but he does zero damage. I've upped his strength and equipped items but still nothing. I'm using the latest dev versions of citizens and sentry. Plugins I'm using: BattleArena YAPP CommandBook Sentry CookieMonster Factions mcore
Any help would be appreciated! Thanks!
-
View User Profile
-
Send Message
Posted Aug 13, 2013i updated to 1.5.1 and there's a problem with it the sentry wont die no matter how many hits he takes i looked into his info after every hit it never go below 1 even if i tried to set it to 0 manually and i have everything off on him that could possibly respawn him any help ? and i also get an error when applying /trait sentry it says NoSuchMethod if you guys can help me with this too. thank you
-
View User Profile
-
Send Message
Posted Aug 12, 2013Yes. It looks like you've found it. *Cries* Thanks for your help. I hope bukkit decides to fix it someday :(
-
View User Profile
-
Send Message
Posted Aug 12, 2013@Rkaynjehll
sounds like you're having this problem. https://bukkit.atlassian.net/browse/BUKKIT-4634
-
View User Profile
-
Send Message
Posted Aug 12, 2013Here's what I've found today.
I've created an npc. /npc create Nighthawk - -trait sentry
added targets. sentry target add entity:all
The sentry does not attack me (in gm1 or gm0) but will attack mobs that walk too close. If I walk out of range and come back or issue the target cmd from a distance it will attack me once. Then will not work again after he respawns. (Getting the sentry to attack this way is NOT a 100% reccuring event.)
However.. If I logout within detection range. When I log back in he sees me and attacks. THIS method works 100%. But after he respawns he goes back to being lazy.
However x2... If I set a teleport or warp to put a player withing range, the NPC is still lazy and will not detect the target.
I appologize if I seem bothersome but I'm hoping that the info provided may help you find a solution. This is a GREAT plugin and I'm very thankful you've put so much time into making it better.
-
View User Profile
-
Send Message
Posted Aug 12, 2013@MasterLuigi98
Use a single waypoint with /npc path
-
View User Profile
-
Send Message
Posted Aug 12, 2013Is it possible that after Sentry's killed their target, they go back to their original location? That would be really helpfull!
-
View User Profile
-
Send Message
Posted Aug 12, 2013@Rkaynjehll
Ive had some reports about possible bugs in the Bukkit player line-of-sight code. Talking it over with the Citizens dev now.
-
View User Profile
-
Send Message
Posted Aug 12, 2013I must say I'm going a bit crazy. I'm on 1.6.2 Using all the latest builds for citizen2, denizen and sentry (tried multiple dev builds as well). I started a fresh server with no other plugins for testing. I've searched google for the answer. Also done everything I can possibly think of to find the problem. This MUST be a bug. I've put 6 days into troubleshooting.
Here's the issue. I create an NPC with the sentry trait. Then add target entity:all. The NPC should attack me, mobs, other players ect.. This is where the fun starts.. grr. It will attack the first few times (on a fresh startup). Then the NPC forgets everything I told it to do. It will attack mobs within range. But not players. It will retaliate against players. But will not attack players within range. I think it gets bored or something lol.. Is this an issue anyone is aware of? I'm trying to use NPCs as custom mobs for my RPG server and would really like to resolve this.
-
View User Profile
-
Send Message
Posted Aug 11, 2013@luigi_carsi3
Yes I've had reports of the factions targets not working since factions 2.0. It's on my to-do list.
@Thechegga
Check to see if you're running ModifyWorld. I had some reports that some versions of that plugin would prevent the mounting.
-
View User Profile
-
Send Message
Posted Aug 10, 2013Hi, how can I mount a Sentry??
When I use /sentry mount the hourse spawns but the Npc doesn't sit on it.
-
View User Profile
-
Send Message
Posted Aug 9, 2013When I set my sentry to attack a certain faction (/sentry target add faction:Lothan) the players of that faction can walk past the sentry and it won't attack! Please help, even when I set individual players as the sentry's targets, it won't attack! It only attacks the players if they hit first.
-
View User Profile
-
Send Message
Posted Aug 8, 2013@ThaSourceGaming
If you can, hop onto the Citizens IRC using the link on the wiki and I'll try and troubleshoot it with you.