Peace Banner
The Peace Banner is a craftable item that suppresses ordinary natural elite conversion within a configurable chunk radius. With suppressEvents: true, it also suppresses action events and timed-event spawn attempts handled by EliteMobs. It does not block arbitrary custom/regional boss spawns, remove existing elites, or provide general protection against mobs.
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: With the feature enabled, placing a Peace Banner registers protection immediately. The default radius of 4 covers a 9×9 chunk square centered on its chunk, at every height; it is not a circle measured from the block.
- 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 |
chunkRadius is captured when each banner is placed and saved with that banner. Changing the configuration does not resize existing banners, even after restart; replace them to use the new radius. The default item lore contains a literal 4 and does not update with the radius, while placedMessage replaces $radius.
enabled: false disables suppression, placement/break/load handling and the crafting recipe. It does not delete saved banner records or prevent the admin give command. craftable: false disables only the recipe.
Admin Commands
| Command | Permission | Description |
|---|---|---|
/em peacebanner give <player> | elitemobs.peacebanner.admin | Gives a Peace Banner to an online player; drops it at their location if their inventory is full |
/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
- New Peace Banner placements are identified by the item's persistent data container (PDC) tag, not by appearance. An ordinary banner placed at an unregistered location does not create protection.
- Banner data is stored in
plugins/EliteMobs/data/peace-banners.yml. - When a chunk loads, validation checks only whether any banner block exists at the saved location. It does not recheck a Peace Banner tag or pattern. If the block is no longer a banner (e.g., destroyed by an explosion or world edit), the protection is removed then, rather than immediately when that outside change occurs.
- Saved records belong to the world's UUID. Records for a world that is not loaded during EliteMobs initialization stay inactive until that world loads, then their protection activates automatically. A different world that reuses the same name does not inherit them; EliteMobs logs a warning instead.