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 Jan 6, 2013Is there a way to fix the Guard that are guarding players to spawn back when the player logs back on? and to fix the problem of them not tping to the player when they tp home or to spawn and whatnot? Thanks
-
View User Profile
-
Send Message
Posted Jan 6, 2013A modification in Essentials Protect seems to have solved the problem (allowing the players to take damages from visitors.) Thanks.
-
View User Profile
-
Send Message
Posted Jan 6, 2013@jrbudda
i set the pathfinding range of the sentry to 100 and i stood a mere 20 blocks away, shot an arrow and it didnt come running after me...
-
View User Profile
-
Send Message
Posted Jan 5, 2013@Zarkiel7
Sentries only retaliate to arrows within their pathfinding range, you can set the pathfinding range separately from their detection range with the /npc pathfindingrange command.
@Atogadp
Sounds like a plugin conflict, or the sentries strength is set to 0.
-
View User Profile
-
Send Message
Posted Jan 5, 2013Hi. We use 2.0.6 version of Citizens, and we experience a strange issue : sentries don't do any damage to players, neither with bow or swords, they just seem to parry when they try to strike.
-
View User Profile
-
Send Message
Posted Jan 4, 2013Sentrys only retaliate to bows if you are within their attack range, and i cant set the range too high because i want them to attack players within their range... so is there any other way to do this?
-
View User Profile
-
Send Message
Posted Jan 2, 2013hey i cant seem how to stop my sentry's attacking each other i tried /sentry ignore add entity:guard but my archer is adamant the guard should die :P
-
View User Profile
-
Send Message
Posted Dec 30, 2012@jrbudda
I think the disappearing equipment is a lag glitch, the equipment comes back after a while. I do not think I have any other plugins influencing arrows, but the sentries take around ten hits to kill anything while I can kill most hostile mobs in three shots or less.
As for NPCs attacking each other, I had one sentry with no targets and one which targets entity:monster, event:PvP, and event:PvNPC. I hit the no-target NPC and he attacked me. The other NPC then ran in and killed the first one, completely ignoring me.
-
View User Profile
-
Send Message
Posted Dec 30, 2012Only problem I have been having is that if a sentry kills a player, it sometimes is teleported to spawn with the player. Wondering if there is a way to fix this? Also no errors come up in the console.
-
View User Profile
-
Send Message
Posted Dec 29, 2012Are there any dev builds available? The latest one doesnt seem to work for me, it says "that command must be performed on a sentry"
-
View User Profile
-
Send Message
Posted Dec 29, 2012@Thrystor
I can confirm the issue with ranged sentries not facing the correct direction. And yes it would seem sentries with the event:pvp target will attack players who manage to shoot themselves. Will correct those in next build.
I cannot reproduce the arrow damage issue, sentry arrows deal damage equal to their strength for me, perhaps you have another plugin affecting arrows?
Also cannot reproduce sentries attacking NPCs due to Pv events. Can't see how its possible from the code.
Need more information about circumstances around sentry equipment disappearing, that's handled inside Citizens and not sentry.
@zarakh01
Sentries do retaliate to arrows. Your problem is likely that the shooter is out of pathfinding range for the boss. You can either increase his range or build your boss area in a way to prevent sniping.
@wrigglybear
No there isn't but that is an interesting idea.
-
View User Profile
-
Send Message
Posted Dec 28, 2012Guards also attack people who shoot themselves with arrows.
-
View User Profile
-
Send Message
Posted Dec 28, 2012And every now and then a sentry loses all of its equipment for no reason.
-
View User Profile
-
Send Message
Posted Dec 28, 2012There's a little bit of a problem with archers right now. The archer won't look at the target, so I have an archer who looks north but shoots enemies to the south. I've also noticed that arrows from sentries deal very little damage regardless of strength. And sentries have been treating NPCs hitting players as a PvP event and then beating up the NPC.
-
View User Profile
-
Send Message
Posted Dec 25, 2012Is there a way to make a sentry retaliate to an arrow, because players can snipe my npc bosses and stuff with bows, and the boss doesn't retaliate
-
View User Profile
-
Send Message
Posted Dec 24, 2012Is there a way to get sentries to attack all npcs owned by a particularly player?
-
View User Profile
-
Send Message
Posted Dec 24, 2012@vfhnbhjvhggh
fixed it! I just got a backup citizens save file from before the update and replaced the newer file. works perfectly fine now :D
-
View User Profile
-
Send Message
Posted Dec 24, 2012it appears the new update has wiped all the sentry traits of all my npcs.. im not sure why it has done this though, as my citizens saves show the traits. could someone please help me out?
if i were to reprogram i would spend about 3 hours!!!
-
View User Profile
-
Send Message
Posted Dec 24, 2012nevermind.. forgot to check the wiki
-
View User Profile
-
Send Message
Posted Dec 24, 2012doesn't work for 1.4.6-0.1...