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.
@aoe2exp
Not currently, no :(
definitely on the TODOList though.
Hello,
Is it possible to group them for stats? like all archers, guards, etc? it'd make it real easy to change all archers' range at once.
Thank you and great work!
@flyingfencepost
/npc skin <skinname>
skin search: http://mcmonkey.org/denizen/skin/npc
How do i get my sentrys to have skins like its shown here?
@woeterman94
http://wiki.citizensnpcs.co/Versions
@mcmonkey4eva
I can't find a 1.7.10 version for citizens...
@MrHollick
You're running 1.7.10 Citizens on a 1.7.9 server. Update the server or downdate Citizens.
Hoping you might take a look at this small clip from server restart and see why Im getting these trait errors http://pastebin.com/dt7HMqdN
thank you
@Teddestroyer
You're running Sentry for 1.7.10 on a 1.7.9 server - downdate Sentry or update the server.
ERROR here [21:50:45 WARN]: java.lang.NoClassDefFoundError: net/minecraft/server/v1_7_R4/Packet [21:50:45 WARN]: at net.aufdemrand.sentry.SentryTrait.ensureInst(SentryTrait.java:134) [21:50:45 WARN]: at net.aufdemrand.sentry.SentryTrait.onSpawn(SentryTrait.java:116) [21:50:45 WARN]: at net.citizensnpcs.api.npc.AbstractNPC.addTrait(AbstractNPC.java:111) [21:50:45 WARN]: at net.citizensnpcs.api.npc.AbstractNPC.addTrait(AbstractNPC.java:90) [21:50:45 WARN]: at net.citizensnpcs.commands.TraitCommands.addTrait(TraitCommands.java:59) [21:50:45 WARN]: at net.citizensnpcs.commands.TraitCommands.toggle(TraitCommands.java:152) [21:50:45 WARN]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [21:50:45 WARN]: at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [21:50:45 WARN]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [21:50:45 WARN]: at java.lang.reflect.Method.invoke(Unknown Source) [21:50:45 WARN]: at net.citizensnpcs.api.command.CommandManager.executeMethod(CommandManager.java:153) [21:50:45 WARN]: at net.citizensnpcs.api.command.CommandManager.execute(CommandManager.java:90) [21:50:45 WARN]: at net.citizensnpcs.api.command.CommandManager.executeSafe(CommandManager.java:177) [21:50:45 WARN]: at net.citizensnpcs.Citizens.onCommand(Citizens.java:236) [21:50:45 WARN]: at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) [21:50:45 WARN]: at me.Incomprehendable.WorldPlugins.FakeSimpleCommandMap.dispatch(FakeSimpleCommandMap.java:99) [21:50:45 WARN]: at org.bukkit.craftbukkit.v1_7_R3.CraftServer.dispatchCommand(CraftServer.java:701) [21:50:45 WARN]: at net.minecraft.server.v1_7_R3.PlayerConnection.handleCommand(PlayerConnection.java:956) [21:50:45 WARN]: at net.minecraft.server.v1_7_R3.PlayerConnection.a(PlayerConnection.java:817) [21:50:45 WARN]: at net.minecraft.server.v1_7_R3.PacketPlayInChat.a(PacketPlayInChat.java:28) [21:50:45 WARN]: at net.minecraft.server.v1_7_R3.PacketPlayInChat.handle(PacketPlayInChat.java:47) [21:50:45 WARN]: at net.minecraft.server.v1_7_R3.NetworkManager.a(NetworkManager.java:157) [21:50:45 WARN]: at net.minecraft.server.v1_7_R3.ServerConnection.c(SourceFile:134) [21:50:45 WARN]: at net.minecraft.server.v1_7_R3.MinecraftServer.v(MinecraftServer.java:667) [21:50:45 WARN]: at net.minecraft.server.v1_7_R3.DedicatedServer.v(DedicatedServer.java:260) [21:50:45 WARN]: at net.minecraft.server.v1_7_R3.MinecraftServer.u(MinecraftServer.java:558) [21:50:45 WARN]: at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java:469) [21:50:45 WARN]: at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:628) [21:50:45 WARN]: Caused by: java.lang.ClassNotFoundException: net.minecraft.server.v1_7_R4.Packet [21:50:45 WARN]: at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:67) [21:50:45 WARN]: at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:62) [21:50:45 WARN]: at java.lang.ClassLoader.loadClass(Unknown Source) [21:50:45 WARN]: at java.lang.ClassLoader.loadClass(Unknown Source)
@madtomic
1.7.9 build is compatible with all 1.7.9-r0.x. If you're getting an error, you might want 1.8.2b2 from the wiki http://wiki.citizensnpcs.co/Sentry#Updates
update coming for cb1.7.9-r0.2?
Just installed the latest version of Citizens 2 and Sentry. They are the only 2 plugins i have.
For some reason, the sentries cant damage other sentries or me. it can damage and be damaged by mobs though. Any idea?
@iSynn
You downloaded 1.7.9-compatible Sentry. Get 1.8.2b3 here http://wiki.citizensnpcs.co/Sentry#Updates
@mcmonkey4eva
I did update Sentry to 1.7.10. Did I perhaps download the wrong file..? ./trait sentry gives me java.lang.NoClassDefFoundError:net/minecraft/server/v1_7_R3/Packet
@Syraleaf
Citizens didn't, you somehow acquired the correct build.
The other plugins, quite likely.
Citizens and Sentry and plugins like them use /internal code/ that's outside the frame of the Bukkit API - we aren't supposed to be accessing it. To discourage us, the Bukkit team has taken to adding version numbers to the code, so it forces us to update our code every time Bukkit changes their numbers, or the plugin won't work.
@mcmonkey4eva
Woooops :D I got the version from the ""take the latest version here"" and it seems to be diffrend. I'll try the other one out now and post if it did not work :)
{Edit}: I downgraded my sentry plugin and now it seems to work fine :) ty for your help! There is only 1 thing I dont get... Why do all the other plugins work with 1.7.10 (including my citizens) and did sentry not :)
v. 1.8.2 build 3 06/13/14 download
Update to work with Bukkit for MC 1.7.10
And with this one
v. 1.8.2 build 2 06/13/14 download
mini-update to patch compatibility with latest Denizen dev builds
This is my problem again :/
And this one with this update
v. 1.8.2 03/24/14 download
Update to work with Bukkit for MC 1.7.8 -> (EDIT: then to 1.7.9 as well)
[11:27:12 INFO]: xX98polo98Xx issued server command: /trait Sentry [11:27:12 WARN]: java.lang.ClassCastException: net.aufdemrand.sentry.Sentry cannot be cast to net.aufdemrand.sentry.Sentry [11:27:12 WARN]: at net.aufdemrand.sentry.SentryTrait.<init>(SentryTrait.java:25) [11:27:12 WARN]: at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [11:27:12 WARN]: at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) [11:27:12 WARN]: at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [11:27:12 WARN]: at java.lang.reflect.Constructor.newInstance(Constructor.java:526) [11:27:12 WARN]: at java.lang.Class.newInstance(Class.java:374) [11:27:12 WARN]: at net.citizensnpcs.api.trait.TraitInfo.tryCreateInstance(TraitInfo.java:41) [11:27:12 WARN]: at net.citizensnpcs.npc.CitizensTraitFactory.create(CitizensTraitFactory.java:110) [11:27:12 WARN]: at net.citizensnpcs.npc.CitizensTraitFactory.getTrait(CitizensTraitFactory.java:117) [11:27:12 WARN]: at net.citizensnpcs.api.npc.AbstractNPC.getTraitFor(AbstractNPC.java:242) [11:27:12 WARN]: at net.citizensnpcs.api.npc.AbstractNPC.addTrait(AbstractNPC.java:90) [11:27:12 WARN]: at net.citizensnpcs.commands.TraitCommands.addTrait(TraitCommands.java:59) [11:27:12 WARN]: at net.citizensnpcs.commands.TraitCommands.toggle(TraitCommands.java:152) [11:27:12 WARN]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [11:27:12 WARN]: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [11:27:12 WARN]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [11:27:12 WARN]: at java.lang.reflect.Method.invoke(Method.java:606) [11:27:12 WARN]: at net.citizensnpcs.api.command.CommandManager.executeMethod(CommandManager.java:153) [11:27:12 WARN]: at net.citizensnpcs.api.command.CommandManager.execute(CommandManager.java:90) [11:27:12 WARN]: at net.citizensnpcs.api.command.CommandManager.executeSafe(CommandManager.java:177) [11:27:12 WARN]: at net.citizensnpcs.Citizens.onCommand(Citizens.java:236) [11:27:12 WARN]: at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) [11:27:12 WARN]: at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:180) [11:27:12 WARN]: at org.bukkit.craftbukkit.v1_7_R3.CraftServer.dispatchCommand(CraftServer.java:701) [11:27:12 WARN]: at net.minecraft.server.v1_7_R3.PlayerConnection.handleCommand(PlayerConnection.java:956) [11:27:12 WARN]: at net.minecraft.server.v1_7_R3.PlayerConnection.a(PlayerConnection.java:817) [11:27:12 WARN]: at net.minecraft.server.v1_7_R3.PacketPlayInChat.a(PacketPlayInChat.java:28) [11:27:12 WARN]: at net.minecraft.server.v1_7_R3.PacketPlayInChat.handle(PacketPlayInChat.java:47) [11:27:12 WARN]: at net.minecraft.server.v1_7_R3.NetworkManager.a(NetworkManager.java:157) [11:27:12 WARN]: at net.minecraft.server.v1_7_R3.ServerConnection.c(SourceFile:134) [11:27:12 WARN]: at net.minecraft.server.v1_7_R3.MinecraftServer.v(MinecraftServer.java:667) [11:27:12 WARN]: at net.minecraft.server.v1_7_R3.DedicatedServer.v(DedicatedServer.java:260) [11:27:12 WARN]: at net.minecraft.server.v1_7_R3.MinecraftServer.u(MinecraftServer.java:558) [11:27:12 WARN]: at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java:469) [11:27:12 WARN]: at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:628) [11:27:12 ERROR]: [Citizens] Cannot register a null trait. Was it registered properly?
@NuiluChu
@Syraleaf
That means you're running a 1.7.9 build of Sentry on (some other version. I can't know which other version because you didn't post the full error message).
The solution is either updating or downdating Sentry to match your CraftBukkit version. Here's the list of Sentry updates with their compatible CB version: http://wiki.citizensnpcs.co/Sentry#Updates
@Syraleaf
Do you know what it means...? :/ I'm pretty stuck and I can't get any farther on this project on this server without it..