Skip to main content

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

  1. 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.
  2. 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.
  3. Removing: Breaking the Peace Banner block removes the protection zone and allows elite mobs to spawn in the area again.
  4. 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.

SettingDefaultDescription
enabledtrueWhether the Peace Banner feature is enabled
craftabletrueWhether players can craft Peace Banners
chunkRadius4Radius (in chunks) around a placed banner where elite mobs are suppressed
suppressEventstrueWhether placed banners also suppress EliteMobs events (action and timed events)
recipeShapeBBB / BWB / BBBThe crafting grid layout
recipeIngredientsB: BONE, W: ANY_BANNERMaps recipe characters to materials
itemName&aPeace BannerDisplay 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

CommandPermissionDescription
/em peacebanner give <player>elitemobs.peacebanner.adminGives a Peace Banner item to the specified player
/em peacebanner listelitemobs.peacebanner.adminLists 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.