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 May 24, 2013I have an issues, when i use /sentry guard <name> it deal no damage to mob at all, even thou is attacking. But when i /sentry guard, guarding the environment, it causes damage
Isses: I found the reason that is causing it, when i op myself, then it will deal damage to the mob, if i deop it would not work. Not to mention even "*" on pex does not work too. Only when op then it will work
-
View User Profile
-
Send Message
Posted May 24, 2013how about /sentry attackrange command?
-
View User Profile
-
Send Message
Posted May 20, 2013Whenever I add a target then place the target in front of it, the computer freezes and I must shut it down. I don't know why. Will anyone help?
-
View User Profile
-
Send Message
Posted May 20, 2013How do I get rid of them once I spawn them? Cause I have 2 guards, one that just stands there, and one that follows me around, and I can't get rid of them xD
-
View User Profile
-
Send Message
Posted May 18, 2013How Do You Change The Npc's Skin, Cause If I Put A Certain Name On A Npc It Creates Its Own Skin, Like I Did /Npc Create &3Robber and it had this weird skin, also did &2Prisoner, and gave him a kings skin.
-
View User Profile
-
Send Message
Posted May 17, 2013Is it possible to stop a Sentry from going into the water when chasing a player.
Thanks.
-
View User Profile
-
Send Message
Posted May 16, 2013I removed the sentry I modified before the last crash, it was 5 days ago, no more crashes (before I had them almost every day) so I am pretty sure I got this crash because of Sentry plugin: http://pastebin.com/ACYPkWMV
Before comment: http://dev.bukkit.org/server-mods/sentry-citizens2/?comment=538
-
View User Profile
-
Send Message
Posted May 16, 2013@jrbudda
Got a problem =/
played a bit around and made a squid NPC then trait sentry.
But he won't be really usefull because he gets all the time waterdmg or sth and cant swim rly =/
Have I made sth wrong?
-
View User Profile
-
Send Message
Posted May 15, 2013@jrbudda:
How can i make that the npc spawn on the place I want him to? Why when he die he respawn in the place who was killed.
Help me :) I really need help.
-
View User Profile
-
Send Message
Posted May 14, 2013OK finally found it
Its a multiverse setting
You can configure a PvP flag per world within the multiverse config files.
this falg has to be set to true to attack the playertype sentrys
-
View User Profile
-
Send Message
Posted May 14, 2013ok did a bit more testing
Deleted everything
Set up a new bukkit using this as the server.properties file:
#Minecraft server properties
#Tue May 14 11:56:40 EDT 2013
generator-settings=
allow-nether=true
level-name=New_world
enable-query=false
allow-flight=false
server-port=25565
level-type=DEFAULT
enable-rcon=false
force-gamemode=false
level-seed=
server-ip=
max-build-height=256
spawn-npcs=true
white-list=false
spawn-animals=true
hardcore=false
snooper-enabled=true
texture-pack=
online-mode=true
pvp=false
difficulty=3
gamemode=0
max-players=16
spawn-monsters=true
view-distance=9
generate-structures=true
spawn-protection=16
motd=testing
let it create itself, shut it off, copied over citizens and sentry into plugins and fired it up.
Created a new NPC sentry set to target all entities and it is broken.
Shut off the server, changed this setting in the properties file:
pvp=true
Fired the server back up and the sentry will now attack.
Shut off again
set it back to
pvp=false
fired it up and the sentry cannot harm you.
so,
I deleted everything again.
let bukkit create a new server, and noticed that the default bukkit setting for pvp is true.
shut it down copied over the citizens and sentry jars,
I then set the pvp setting to false and fired it up.
The NPC will not harm you with pvp set to false, but will if you set it to true.
So, it looks like the PvP flag has to be set to true for playertype sentrys to attack you.
Whats wierd is i did try setting this to true on the production server last night and it made no difference.
Im going to flip that on the prob server here in a few minutes and see if it fixes it.
-
View User Profile
-
Send Message
Posted May 14, 2013ok i think i've narrowed down the problem.
Does this addon require that the world be named 'world'?
In my test server, the stock bukkit created a new world called 'world'.
The addon works fine.
I added each of my plugins in 1 at a time, and it worked fine even after copying them all over.
One of my addon's is multiverse, and in copying over the .jar along with the config files, it built out my other worlds. ( the map is different of course but the other worlds are there )
So, I warped to the other world, tried making a new NPC sentry and its broken in those worlds.
If I warp back to the world ' world " it works fine.
If the world name is different such as New_World
the Player type sentrys will not harm players, or be attackable.
I thought it might be a world guard thing so I removed worldguard and it does the same thing.
so from what I can tell, it works is the default world name is 'world' but doesnt work if your default world name is called New_world. ( perhaps its the underscore in the name) ? i dont know
-
View User Profile
-
Send Message
Posted May 14, 2013hi jrbuudda,
just tried some testing on a fresh bukkit with only citizens and sentry installed and its working properly.
Ill be adding my additional plugins in 1 at a time until i figure out which one is causing the problem.
I have about 40 of them installed so it may take a while
-
View User Profile
-
Send Message
Posted May 14, 2013@jeffro1001
Are you running Heros or a similar plugin?
-
View User Profile
-
Send Message
Posted May 13, 2013This looks like a really awesome plugin.
I decided to try it out but im having some trouble
I create a player type NPC give it the sentry trait, configure its target to be entity:all
and it acts like its attacking but causes no damage.
I cannot damage it either
Ive tried toggling various settings invincibility strength ect.
It tries to attack other players but causes no damage. no one can harm it
It has no trouble killing monsters.
Im running bukkit build #2774
Citizens v2.0.8-SNAPSHOT (build 803)
Sentry v1.3.5
The server server PvP setting is set to true
Ive tried changing that to false as well. makes no difference
I can create a monster type npc and it is attackable but playertype is not
-
View User Profile
-
Send Message
Posted May 13, 2013amazing mod :D I use it a lot on my server..
idea - woud it be possible to group sentries together in set groups. ie a police group or a regiment.
so when you have a new enemy you can set the regiment group to attack the enemy (without having to go around all the npcs individually) by telling the group to attack
or the police group you can have a police npc in each town then set the police group to attack a specific player if they are wanted and all the police npcs will have the same setting
-
View User Profile
-
Send Message
Posted May 12, 2013jrbudda, I had this crash twice today on a lapse of 2 hours. I hadn't this crash since 2 days ago (And to day I had it some few minutes after of modifying a Sentry NPC).
Denizen had this crash but on the build I'm using the changelog says that it's fixed. Maybe is Sentry causing it?
Crash: http://pastebin.com/ACYPkWMV
-
View User Profile
-
Send Message
Posted May 10, 2013i create a guard i fix so the he attacks the pvps but he don't hurt anyone ?
-
View User Profile
-
Send Message
Posted May 8, 2013Great Mod, looking forward to using it.
-
View User Profile
-
Send Message
Posted May 7, 2013@Blaise49
Its on the wiki.