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 8, 2013@jrbudda
Okay, I also did /sentry range which i forgot to mention, it still didn't work. I bring the sentry close to another sentry as well, while i'm hitting one, the other sentry's don't do anything.
I don't want to use Denizen, because I already have too many plugins, i just wish to use this feature and hope it is fixed if there is by any chance a bug, if you wish to come on my server and see for yourself, you may. Just ask.
-
View User Profile
-
Send Message
Posted Aug 8, 2013@ThaSourceGaming
Make sure the sentries are within each other's range. (/sentry range)
You can also do some more advanced things with Denizen. For example you could give all sentries a Group target, and script them so that if they are attacked it puts that player into that group so all sentries will be permanently aggressive to them.
Archer (and all ranged) sentries do not chase, If you want to make them harder to hit you can make them patrol with /npc path, they will continue to move on their waypoints while shooting.
-
View User Profile
-
Send Message
Posted Aug 7, 2013@ThaSourceGaming
same issue here :D
-
View User Profile
-
Send Message
Posted Aug 7, 2013How do I make it so if a player attacks 1 sentry, ALL other sentrys attack the player?
I added Event:PvSentry, but when i attack one NPC beside another one, it still does nothing. I need help. please!
problem 2: How do I make Archers follow? Players seem to hit Archers from a far distance and hide behind walls, but the Archer still attempts to hit the player from where he is standing, the Archer would not chase down the attacking player, instead it would just stand still and shoot.
-
View User Profile
-
Send Message
Posted Aug 6, 2013@NoArmsNoCookies
No, but theres some options in Citiznes to limit the number of NPCs a player can create.
@NewGuy01
Have you looked at the Event:PvSentry target? that should allow sentries near each other to respond to an attack on one.
@ShogunTheBeast
Update Sentry to 1.5.1 on the wiki for latest Denizen compatibility that is causing that problem.
-
View User Profile
-
Send Message
Posted Aug 6, 2013Is it possible you could (If you are still working/adding on to this) make perhaps links between certain sentrys to help eachother when one is being attacked?
-
View User Profile
-
Send Message
Posted Aug 5, 2013Is it possible to limit the number of sentries per player, indepent from limits for e.g. traders?
-
View User Profile
-
Send Message
Posted Aug 5, 2013Would it be possible for someone to add maven build support (pom.xml)? I typically make test builds on my server where eclipse is not available/possible.
Thanks for the nice plugin!
-
View User Profile
-
Send Message
Posted Aug 5, 2013Why is it that my npcs will loss health down to 1 then be invincible.
-
View User Profile
-
Send Message
Posted Aug 5, 2013It's all well and updated, but the sentry that just attacks the attacks, even those that are not marked as targets.
-
View User Profile
-
Send Message
Posted Aug 5, 2013@Brky1
I will look into it, I don't use factions myself.
@Neil9444 NPC's have skins related to the player you name them after, there's more details on the wiki.
@MozartMozart1000
Yes, yes there is.
@gammerstar You have to give him targets. If you already gave him targets check for errors in your server console, and make sure you are up to date on everything.
-
View User Profile
-
Send Message
Posted Aug 5, 2013Why my sentry is "passive" and just retaliate atacks?
-
View User Profile
-
Send Message
Posted Aug 5, 2013THERE ISNT ANY 1.6+ LINK ON THE WIKI, PLZ UPDATE !
-
View User Profile
-
Send Message
Posted Aug 4, 2013Are they supposed to have skins? My NPC skins arent showing up.
-
View User Profile
-
Send Message
Posted Aug 4, 2013Hi.. I want only ask.. I posted one comment before, when i add FACTION:<faction name> ... Is it repaired now?
-
View User Profile
-
Send Message
Posted Aug 4, 2013@jrbudda
Cheers bro, yeah I am trying to use its name not the id.
Sorry about bugging you for it :P
-
View User Profile
-
Send Message
Posted Aug 3, 2013@frol1
That's an error in Citizens, not Sentry, but it looks like it's unhappy with the command you are giving it. The syntax for despawn is /npc despawn id. are you trying to do it with the NPC's name instead?
-
View User Profile
-
Send Message
Posted Aug 3, 2013Hey, Im trying to despawn a NPC with the guard trait. but im getting this error when I try.
Basically im trying to have a NPC spawn when a quest is given and have that NPC follow the player until they get to a certain location.
-
View User Profile
-
Send Message
Posted Aug 3, 2013Hello, I have a souvis with sentryIn fact when I spawn mob or other he attacks but when for example I have a mob attacking me and I run to the sentry that he kills the mob, and he does nothing and this for all the mob attacking me or at least that is me. A solution?
-
View User Profile
-
Send Message
Posted Aug 2, 2013If your mounted sentries aren't doing any damage make sure you update to the very latest Citizens2 dev build. Also there's some fixes incoming to mount speed and teleporting.