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 Mar 13, 2013@whongach
My guess is that Heroes (this is a guess) is causing the issue. Heroes is known to have many issues with Citizens.
-
View User Profile
-
Send Message
Posted Mar 13, 2013@Thrax33
/npc owner server
@whongach
This almost has to be a plugin conflict, try temporarily removing other plugins to see if the problem goes away.
-
View User Profile
-
Send Message
Posted Mar 13, 2013@jrbudda
I am still facing a damage problem that I inquired about last week. After more testing I am able to reproduce it consistently. I suppose it could be a plugin conflict but I'm doubtful of that since every other circumstance works fine. Here is what I found:
If I create a Sentry with default type Player, and leave armor default to 0, I always deal 200 damage to it.
However, if I switch its type to a mob like Zombie then I deal normal damage. OR, if I create a normal citizen npc (without sentry trait) and I set it to vulnerable then I also deal normal damage to it.
Any clue why a Player type sentry is receiving 200 damage with any and all wielded weapons?
I am running the latest Citizens, Sentry and Denizens as well as Heroes.
-
View User Profile
-
Send Message
Posted Mar 12, 2013how do you make it so a NPC is owned by the server, so i can access and edit other peoples sentrys they have made?
-
View User Profile
-
Send Message
Posted Mar 10, 2013@jrbudda
Thank you! It works now :)
-
View User Profile
-
Send Message
Posted Mar 10, 2013I get a error when I typ this please help. /sentry target add entity:all
-
View User Profile
-
Send Message
Posted Mar 10, 2013@kakirocks
Try build 738 of Citizens, see if that does it.
@Welite
You can do this by using the Denizen Citizens plugin and scripting the NPC's death.
-
View User Profile
-
Send Message
Posted Mar 10, 2013I have decided to add a Gun plugin, so thats what I did. But when I shoot a Sentry with a custom gun and deal damage, it shows an error on the console which is annoying(It actually does nothing in game). I've tried with 3 gun plugins(Pvpguns+, Crackshots and Modern Weapons) I know it's not something important for many people, but I'd be happy if it was fixed.
Here's the error on the console when I use Pvpguns+ on a sentry http://pastebin.com/8CQCLRGj
-
View User Profile
-
Send Message
Posted Mar 9, 2013Hi, please can you add feature that you can set with command what will the sentry drop ?
Because I want to equip my npc with DIA armor, but I want they drop for example 1 stone.
Is that possible ?
-
View User Profile
-
Send Message
Posted Mar 8, 2013@leponder
Does that actually work?? Changing the NPC's type after creation was not possible when I wrote sentry, I've never tried making a player NPC, giving it an item, then changing its type to a mob, can you make a zombie that throws snowballs??
Mob sentries actually are coded to use their normal projectile, Ghasts should shoot fireballs and Withers should shoot skulls without going through that process. The problem you're facing is that flying mobs don't 'path' properly in Citizens, This isn't something I can fix.
@batbat01
Good advice, you might want to put in a suggestion with Citizens to make the path editor a little more fool-proof.
-
View User Profile
-
Send Message
Posted Mar 8, 2013help ist working it says plz report error
-
View User Profile
-
Send Message
Posted Mar 7, 2013Be very VERY careful when working with the path editor that you only type "clear" and not "/clear" when you want to wipe out your path way points. One clears your path, the other clears all of your fully enchanted diamond gear along with EVERYTHING in your inventory.
Learn from my mistake.
-
View User Profile
-
Send Message
Posted Mar 7, 2013I'm trying to figure out a way to make sort of a custom boss (drops, health, healrate, ect.) that works like lookout and sort of stays in one area, but I'm also trying to use the "/npc type" to make it appear as a mob. I made a ghast one but it only seemed to shoot in one straight direction (i.e. not towards me) and then I tried a wither but it's aim was terrible, only really hitting me 10% of the time, compared to the deadly shots a regular lookout has with a bow.
I create the NPC, set it up as sentry and then all of it's traits and then I set it as a mob. I had to give the ghast the redstone torch so it could fire and the wither a skull so it could fire, its there no way to make it attack with its mob ability? Am I going about this process wrong or is this even possible with Citizens/Sentry?
-
View User Profile
-
Send Message
Posted Mar 6, 2013@jrbudda
Thank you! When I turned off /npc vulnerable the sentry damage now works perfectly. I appreciate the insight that this was the conflict.
-
View User Profile
-
Send Message
Posted Mar 6, 2013@whongach
You should not set /npc vulnerable when making a sentry. That was added in long after Sentry was created as a way to make regular npc's die. Sentry's are always 'vulnerable' unless you set /sentry invincible.
You also might have have another plugin interfering with PvP damage amounts.
-
View User Profile
-
Send Message
Posted Mar 6, 2013Try to /sentry info and see the NPCs armor ([AP]), by default is it 0 maybe you have there something like -20. And then i think its about witch difficulty mode you have running on the server (Peaceful, Easy, Hard ... like in singleplayer).
-
View User Profile
-
Send Message
Posted Mar 5, 2013Have an issue...not sure if it's a bug or I simply misunderstand how things work since I am new to this plugin....
I am running latest Bukkit, latest Citizens and and latest Sentry. I created a human NPC and set it to Vulnerable. Set trait to Sentry, Health 20, Armor 0, Criticals OFF.
To test I hit it with a regular iron sword. Every time I deal 200 damage and instantly it is killed.
I deal 6 damage to normal mobs in the game but 200 every time I hit the human NPC with the sentry trait enabled. I turned Vulnerable OFF and I hit it for normal damage (it's not invulnerable as expected) which is an odd side bug between citizens and sentry.
Yet, when I remove the Sentry trait the NPC then takes normal damage. So it would seem that Sentry calculates base damage differently than the standard Minecraft formula. This is understandable in light of the Armor rating, however, my observation is that any type of weapon deals the same damage to the NPC (iron sword, bow, stone pickaxe, etc.).
Is this a known issue? Any insight would be greatly appreciated. I want to get Sentry working so I can control the health, armor, etc. of the human NPCs but right now it would seem the Sentry trait breaks their combat mechanics.
Edit: I went into config.yml and set DieLikePlayers to true and that solved the issue of handling the NPC death with XP, etc. However, I am still dealing "abnormal" 200 pt damage to the NPC...is this supposed to be strictly controlled by the armor value? That solution would be fine except for the fact that every weapon I use against the NPC deals the same damage - iron sword, bow, stone pickaxe, etc. which is not acceptable.
-
View User Profile
-
Send Message
Posted Mar 4, 2013Hi, please can you add feature that you can set with command what will the sentry drop ?
Because I want to equip my npc with DIA armor, but I want they drop for example 1 stone.
Is that possible ?
-
View User Profile
-
Send Message
Posted Mar 4, 2013Hey, I'm getting this error sometimes :
[SEVERE] Could not pass event EntityDamageByEntityEvent to Sentry v1.3.1
org.bukkit.event.EventException
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:427)
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:477)
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:462)
at net.minecraft.server.v1_4_R1.Explosion.a(Explosion.java:167)
at net.minecraft.server.v1_4_R1.World.createExplosion(World.java:1608)
at net.minecraft.server.v1_4_R1.WorldServer.createExplosion(WorldServer.java:773)
at net.minecraft.server.v1_4_R1.EntityLargeFireball.a(EntityLargeFireball.java:29)
at net.minecraft.server.v1_4_R1.EntityFireball.j_(EntityFireball.java:132)
at net.minecraft.server.v1_4_R1.World.entityJoinedWorld(World.java:1332)
at net.minecraft.server.v1_4_R1.WorldServer.entityJoinedWorld(WorldServer.java:548)
at net.minecraft.server.v1_4_R1.World.playerJoinedWorld(World.java:1313)
at net.minecraft.server.v1_4_R1.World.tickEntities(World.java:1191)
at net.minecraft.server.v1_4_R1.WorldServer.tickEntities(WorldServer.java:445)
at net.minecraft.server.v1_4_R1.MinecraftServer.r(MinecraftServer.java:580)
at net.minecraft.server.v1_4_R1.DedicatedServer.r(DedicatedServer.java:224)
at net.minecraft.server.v1_4_R1.MinecraftServer.q(MinecraftServer.java:494)
at net.minecraft.server.v1_4_R1.MinecraftServer.run(MinecraftServer.java:427)
at net.minecraft.server.v1_4_R1.ThreadServerApplication.run(SourceFile:849)
Caused by: java.lang.NullPointerException
at net.aufdemrand.sentry.SentryInstance.onDamage(SentryInstance.java:989)
at net.aufdemrand.sentry.SentryListener.onDamage(SentryListener.java:296)
at sun.reflect.GeneratedMethodAccessor300.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(Jav
-
View User Profile
-
Send Message
Posted Mar 3, 2013@Bob1nz There is a plugin that makes Giants a natural spawning mob and it works great if that's something you would like.