1.x/Guard
< 1.x
Guards perform protection, attacking enemy mobs and/or players. They can be hurt by others, so will die (and respawn).
Configuration Nodes
These nodes can be found in citizens.yml.
Setting - path of the setting
Default Value - default value of the setting
Description - short description of the setting
Setting | Default Value | Description |
---|---|---|
guards.default-bouncer-protection-radius | 10 | The default protection radius for guard bouncers (measured in blocks). |
guards.respawn-delay | 100 | How many ticks after a guard's death before it should respawn. |
Commands
[] - Mandatory
() - Optional
Command - command's syntax
Require Selected - whether the command requires an NPC to be selected
Require Ownership - whether the commands requires you to be the owner of the NPC
Permission - command's permission node
Description - short description of the command
Command | Require Selected | Require Ownership | Permission | Description |
---|---|---|---|---|
/guard help | false | false | citizens.guard.use.help | View the help page for guards |
/guard [type] | true | true | citizens.guard.modify.type | Change the guard's behaviour - currently possible are 'bouncer' and 'bodyguard'. |
/guard flags [-g,m,p] (page) | true | true | citizens.guard.use.flags | View currently set flags. |
/guard addflag (priority) [target] (-a,g,m,p) | true | true | citizens.guard.modify.flags | Add/modify flags. |
/guard delflag [name] [-p,m,g] (-a) | true | true | citizens.guard.modify.flags | Delete a flag. |
/guard radius [radius] | true | true | citizens.guard.modify.radius | Modifies a bouncer's protection radius. |
/guard aggro | true | true | citizens.guard.modify.aggro | Toggles guard aggressiveness. |
Usage
Flags
Flags are the core features of guards. They define which entities should be targeted (or not targeted) by the guard, and are created by using the /guard addflag command. Flags can target monsters, players, and groups. The group targeting feature is only available with PermissionsBukkit.
Flags are by default blacklists - however, whitelists are also possible. By using '-' as the first character of a target, the flag is designated as a whitelist flag. For example, 'fullwall' is a blacklist target, while '-fullwall' is a whitelist target.
Flags can also take a priority, ranging from 1-20, where lower numbers give a higher priority. Essentially, when faced with two targets, the guard will attack the entity with the higher priority. If more than one target has the highest priority found, the guard will attack the entity closest to it. This features is mainly for advanced configuration of guards, and priority will default to 1.
Types
So far, guards can be toggled to two types - bodyguards, and bouncers.
Bouncers
Bouncers are primarily area protection guards. They will stand still, protecting the radius from configured flags. When an enemy is defeated, they will path back to their base point. If an enemy moves out of the protection radius, the guard will stop targeting them (and teleport back if necessary).
Bodyguards
Bodyguards are for personal protection, and will follow you around, protecting you as necessary. They will actively seek out configured flags, until they come outside the protection radius, whereupon they will teleport to you.
Future
An inventory hotbar, for weapon switching and healing. Perhaps more guarding types.