Sentry for Citizens2

Sentry for Citizens2
Sentryhttp://wiki.citizensnpcs.co/images/1/1b/Wordmark.png

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

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.

http://wiki.citizensnpcs.co/images/thumb/f/fd/KnightSentry.png/800px-KnightSentry.png

You must login to post a comment. Don't have an account? Register to get one!

  • Avatar of mcmonkey4eva mcmonkey4eva Aug 17, 2014 at 20:48 UTC - 0 likes

    @CrazyPoloxD: Go

    That's... very strange, such an error shouldn't be possible. Try redownloading Sentry, and double check that you don't have two copies of Sentry in your plugins folder or anything like that.

  • Avatar of CrazyPoloxD CrazyPoloxD Aug 17, 2014 at 11:18 UTC - 0 likes

    Mine Problem [13:15:57 INFO]: xX98polo98Xx issued server command: /trait Sentry [13:15:57 WARN]: java.lang.ClassCastException: net.aufdemrand.sentry.Sentry cannot be cast to net.aufdemrand.sentry.Sentry [13:15:57 WARN]: at net.aufdemrand.sentry.SentryTrait.<init>(SentryTrait.java:25) [13:15:57 WARN]: at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [13:15:57 WARN]: at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) [13:15:57 WARN]: at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [13:15:57 WARN]: at java.lang.reflect.Constructor.newInstance(Constructor.java:526) [13:15:57 WARN]: at java.lang.Class.newInstance(Class.java:374) [13:15:57 WARN]: at net.citizensnpcs.api.trait.TraitInfo.tryCreateInstance(TraitInfo.java:41) [13:15:57 WARN]: at net.citizensnpcs.npc.CitizensTraitFactory.create(CitizensTraitFactory.java:110) [13:15:57 WARN]: at net.citizensnpcs.npc.CitizensTraitFactory.getTrait(CitizensTraitFactory.java:117) [13:15:57 WARN]: at net.citizensnpcs.api.npc.AbstractNPC.getTraitFor(AbstractNPC.java:242) [13:15:57 WARN]: at net.citizensnpcs.api.npc.AbstractNPC.addTrait(AbstractNPC.java:90) [13:15:57 WARN]: at net.citizensnpcs.commands.TraitCommands.addTrait(TraitCommands.java:59) [13:15:57 WARN]: at net.citizensnpcs.commands.TraitCommands.toggle(TraitCommands.java:152) [13:15:57 WARN]: at sun.reflect.GeneratedMethodAccessor1949.invoke(Unknown Source) [13:15:57 WARN]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [13:15:57 WARN]: at java.lang.reflect.Method.invoke(Method.java:606) [13:15:57 WARN]: at net.citizensnpcs.api.command.CommandManager.executeMethod(CommandManager.java:153) [13:15:57 WARN]: at net.citizensnpcs.api.command.CommandManager.execute(CommandManager.java:90) [13:15:57 WARN]: at net.citizensnpcs.api.command.CommandManager.executeSafe(CommandManager.java:177) [13:15:57 WARN]: at net.citizensnpcs.Citizens.onCommand(Citizens.java:236) [13:15:57 WARN]: at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) [13:15:57 WARN]: at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:180) [13:15:57 WARN]: at org.bukkit.craftbukkit.v1_7_R3.CraftServer.dispatchCommand(CraftServer.java:701) [13:15:57 WARN]: at net.minecraft.server.v1_7_R3.PlayerConnection.handleCommand(PlayerConnection.java:956) [13:15:57 WARN]: at net.minecraft.server.v1_7_R3.PlayerConnection.a(PlayerConnection.java:817) [13:15:57 WARN]: at net.minecraft.server.v1_7_R3.PacketPlayInChat.a(PacketPlayInChat.java:28) [13:15:57 WARN]: at net.minecraft.server.v1_7_R3.PacketPlayInChat.handle(PacketPlayInChat.java:47) [13:15:57 WARN]: at net.minecraft.server.v1_7_R3.NetworkManager.a(NetworkManager.java:157) [13:15:57 WARN]: at net.minecraft.server.v1_7_R3.ServerConnection.c(SourceFile:134) [13:15:57 WARN]: at net.minecraft.server.v1_7_R3.MinecraftServer.v(MinecraftServer.java:667) [13:15:57 WARN]: at net.minecraft.server.v1_7_R3.DedicatedServer.v(DedicatedServer.java:260) [13:15:57 WARN]: at net.minecraft.server.v1_7_R3.MinecraftServer.u(MinecraftServer.java:558) [13:15:57 WARN]: at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java:469) [13:15:57 WARN]: at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:628) [13:15:57 ERROR]: [Citizens] Cannot register a null trait. Was it registered properly?

  • Avatar of mcmonkey4eva mcmonkey4eva Aug 16, 2014 at 20:57 UTC - 0 likes

    @iSynn: Go

    You're running the not-latest build of Sentry. You're running a 1.7.9 Sentry on a 1.7.10 server. Sentry dev builds are available here: http://ci.citizensnpcs.co/job/Sentry/

  • Avatar of iSynn iSynn Aug 16, 2014 at 14:33 UTC - 0 likes

    I'm using the latest version of bukkit, citizens, and sentry. My previous sentries do not work anymore. The plugin broke after I updated to 1.7.10. Whenever i type /trait sentry, this appears.

    16.08 00:29:59 [Server] WARN at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628) 16.08 00:29:59 [Server] WARN at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:469) 16.08 00:29:59 [Server] WARN at net.minecraft.server.v1_7_R4.MinecraftServer.u(MinecraftServer.java:558) 16.08 00:29:59 [Server] WARN at net.minecraft.server.v1_7_R4.DedicatedServer.v(DedicatedServer.java:258) 16.08 00:29:59 [Server] WARN at net.minecraft.server.v1_7_R4.MinecraftServer.v(MinecraftServer.java:667) 16.08 00:29:59 [Server] WARN at net.minecraft.server.v1_7_R4.ServerConnection.c(SourceFile:134) 16.08 00:29:59 [Server] WARN at net.minecraft.server.v1_7_R4.NetworkManager.a(NetworkManager.java:157) 16.08 00:29:59 [Server] WARN at net.minecraft.server.v1_7_R4.PacketPlayInChat.handle(PacketPlayInChat.java:47) 16.08 00:29:59 [Server] WARN at net.minecraft.server.v1_7_R4.PacketPlayInChat.a(PacketPlayInChat.java:28) 16.08 00:29:59 [Server] WARN at net.minecraft.server.v1_7_R4.PlayerConnection.a(PlayerConnection.java:818) 16.08 00:29:59 [Server] WARN at net.minecraft.server.v1_7_R4.PlayerConnection.handleCommand(PlayerConnection.java:957) 16.08 00:29:59 [Server] WARN at org.bukkit.craftbukkit.v1_7_R4.CraftServer.dispatchCommand(CraftServer.java:740) 16.08 00:29:59 [Server] WARN at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:180) 16.08 00:29:59 [Server] WARN at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) 16.08 00:29:59 [Server] WARN at net.citizensnpcs.Citizens.onCommand(Citizens.java:236) 16.08 00:29:59 [Server] WARN at net.citizensnpcs.api.command.CommandManager.executeSafe(CommandManager.java:178) 16.08 00:29:59 [Server] WARN at net.citizensnpcs.api.command.CommandManager.execute(CommandManager.java:90) 16.08 00:29:59 [Server] WARN at net.citizensnpcs.api.command.CommandManager.executeMethod(CommandManager.java:154) 16.08 00:29:59 [Server] WARN at java.lang.reflect.Method.invoke(Method.java:606) 16.08 00:29:59 [Server] WARN at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 16.08 00:29:59 [Server] WARN at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 16.08 00:29:59 [Server] WARN at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 16.08 00:29:59 [Server] WARN at net.citizensnpcs.commands.TraitCommands.toggle(TraitCommands.java:152) 16.08 00:29:59 [Server] WARN at net.citizensnpcs.commands.TraitCommands.addTrait(TraitCommands.java:59) 16.08 00:29:59 [Server] WARN at net.citizensnpcs.api.npc.AbstractNPC.addTrait(AbstractNPC.java:90) 16.08 00:29:59 [Server] WARN at net.citizensnpcs.api.npc.AbstractNPC.addTrait(AbstractNPC.java:111) 16.08 00:29:59 [Server] WARN at net.aufdemrand.sentry.SentryTrait.onSpawn(SentryTrait.java:116) 16.08 00:29:59 [Server] WARN at net.aufdemrand.sentry.SentryTrait.ensureInst(SentryTrait.java:134) 16.08 00:29:59 [Server] WARN java.lang.NoClassDefFoundError: net/minecraft/server/v1_7_R3/World

  • Avatar of mcmonkey4eva mcmonkey4eva Aug 14, 2014 at 20:26 UTC - 0 likes

    @Rkaynjehll: Go

    As I said on the Citizens issue page (Please don't multi-report!), it's "entity:player" not "type:player"

  • Avatar of Rkaynjehll Rkaynjehll Aug 14, 2014 at 16:42 UTC - 0 likes

    I'm using the very latest versions of Java (x64) Craftbukkit, Citizens2 and Sentry for 1.7.9 as suggested. I don't know if the issue is in citizens or sentry's code. I ran the following-

    /NPC Create Undead (Success) /Trait Sentry (Success) /Sentry Target Add Type:Player (Success)

    The created sentry refuses to detect/attack players. Tried logging out/back in, no changes.(inside or outside of sentry range)

    PvP is enabled for the server, tested it with a friend. Running no other plugins for testing purposes.

  • Avatar of CommodoreAlpha CommodoreAlpha Aug 09, 2014 at 08:22 UTC - 0 likes

    @mcmonkey4eva: Go

    Really? It mostly just has to do with bow-drawing, not even targeting? I suppose it's a compromise I can live with.

    Does that mean ANY bow draw would be absolutely fatal to the server? And also, if the problem stems solely from bow-drawing, would it be possible to have some way to eliminate the bow drawing animation and just have the NPC shoot the bow directly (like in the older versions of Sentry)?

    Last edited Aug 09, 2014 by CommodoreAlpha

    Sure, I'd love to include my server IP here. But it's under construction, and I wouldn't want to get sued for players wandering inside and getting hit by a random beam of steel floating about. And no, I doubt plugins would make very good lawyers either. I've never seen a plugin that forced you to sign a contract do so well.

  • Avatar of mcmonkey4eva mcmonkey4eva Aug 08, 2014 at 22:55 UTC - 0 likes

    @CommodoreAlpha: Go

    Both errors are Sentry/Cauldron incompatibility issues. Not much to do but convince the Cauldron devs to support NMS better.

    (Note: It's specifically the code that makes a Sentry draw its bow - which Cauldron doesn't support for some reason - it might work if you just... not use bow sentries)

    Last edited Aug 08, 2014 by mcmonkey4eva
  • Avatar of CommodoreAlpha CommodoreAlpha Aug 08, 2014 at 21:28 UTC - 0 likes

    I've gotten this error when a sentry hits a zombie. Anyone have any idea what it means?

    The NPC Sentry stops moving (as if its waypoint path was lost) and it gets disarmed for some reason.

    EDIT: I've also gotten this crash, which again seems to be coming from Sentry.

    I also use this on a Cauldron server, not CraftBukkit. Also, is there a possibility that the issues above are caused by getting hit too rapidly? (For reference, I'm referring to this plugin.)

    Last edited Aug 08, 2014 by CommodoreAlpha
  • Avatar of Silversbane Silversbane Aug 08, 2014 at 21:16 UTC - 0 likes

    I am using Sentry V 1.8.0 and am having an issue with the healrate.

    When I set it to 4.0 it is suppose to heal the sentry for 1HP every 4 seconds. Which it seems to do fine when he is in combat. But as soon as he is out of combat for even the smallest fraction of a second he will heal at insane speed from something like 70hp to 80hp in 1 second.

    Any idea why this might be happening? Any help would be much appreciated.

    Also any idea why my sentries are re spawning after a server restart even after they have been removed using the /npc remove command?

    Last edited Aug 08, 2014 by Silversbane

Your favorite Brigade?

  1. Choice:

  1. Results
  2. 1 comment

Facts

Date created
Sep 11, 2012
Categories
Last update
Jun 03, 2014
Development stage
Release
Language
  • enUS
License
Public Domain
Curse link
Sentry for Citizens2
Downloads
121,125
Recent files

Authors