Peace Banner
The Peace Banner is a craftable item that players can place to create a zone where elite mobs are suppressed. When placed, a Peace Banner prevents elite mob spawning within a configurable chunk radius around it, and can optionally suppress EliteMobs events as well.
How It Works
- Crafting: Players craft a Peace Banner using the default recipe (or a custom recipe configured by the admin). The default recipe requires bones surrounding a banner of any color.
- Placing: When a player places the Peace Banner, it immediately creates a protected zone around it. The default protection radius is 4 chunks in every direction from the banner's chunk.
- Removing: Breaking the Peace Banner block removes the protection zone and allows elite mobs to spawn in the area again.
- Persistence: Placed Peace Banners are saved to disk and persist across server restarts. When chunks containing a Peace Banner load, the plugin validates that the banner block still exists and removes the protection if it has been destroyed by other means.
Default Crafting Recipe
BBB
BWB
BBB
- B = Bone
- W = Any Banner (all 16 banner colors are accepted)
The recipe produces a blue banner with a custom pattern, display name, and lore identifying it as a Peace Banner.
Configuration
All Peace Banner settings are in PeaceBanner.yml. See the config settings page for the full reference.
| Setting | Default | Description |
|---|---|---|
enabled | true | Whether the Peace Banner feature is enabled |
craftable | true | Whether players can craft Peace Banners |
chunkRadius | 4 | Radius (in chunks) around a placed banner where elite mobs are suppressed |
suppressEvents | true | Whether placed banners also suppress EliteMobs events (action and timed events) |
recipeShape | BBB / BWB / BBB | The crafting grid layout |
recipeIngredients | B: BONE, W: ANY_BANNER | Maps recipe characters to materials |
itemName | &aPeace Banner | Display name of the Peace Banner item |
itemLore | (see config) | Lore lines shown on the item |
placedMessage | (see config) | Message sent when a banner is placed |
removedMessage | (see config) | Message sent when a banner is broken |
Admin Commands
| Command | Permission | Description |
|---|---|---|
/em peacebanner give <player> | elitemobs.peacebanner.admin | Gives a Peace Banner item to the specified player |
/em peacebanner list | elitemobs.peacebanner.admin | Lists all placed Peace Banners with their coordinates and chunk radius |
Overlapping Banners
Multiple Peace Banners can be placed with overlapping protection zones. The system uses reference counting, so a chunk remains protected as long as at least one banner covers it. Removing a single banner only unprotects chunks that are not covered by another banner.
Technical Details
- Peace Banners are identified by a persistent data container (PDC) tag, not by appearance. Regular banners are not affected.
- Banner data is stored in
plugins/EliteMobs/data/peace-banners.yml. - When a chunk loads, the plugin checks whether the banner block still exists at the saved location. If the block is no longer a banner (e.g., destroyed by an explosion or world edit), the protection is automatically removed.