Configuration Files

All plugin files are stored inside plugins/ProtectedAreaPlugin/. They are generated automatically on first server start with default values. No manual creation is required.

File Purpose
Config/Config.ymlGlobal plugin settings: mod enforcement and kick message.
AreaNotification/Rules.ymlMessages shown to players when a basic rule blocks their action.
AreaNotification/AdvancedRules.ymlMessages shown when an advanced rule blocks a specific block, entity, or item.
areas/One YAML file per protected area. Managed automatically by the plugin.

Config/Config.yml

Config/Config.yml
# Whether players MUST have the client mod installed to join.
# When true, players without the mod are kicked on join.
mod-required: false

# The message shown to kicked players.
# Supports legacy Minecraft color codes (§).
kick-message: "§c¡Necesitas tener el mod de cliente instalado para jugar en este servidor!"
Key Type Default Description
mod-required Boolean false If true, players without the client mod are kicked on join.
kick-message String See default above The kick screen message. Supports legacy §-codes.

After editing Config.yml, run /area reload config to apply changes.

Notifications

Notification messages are sent to players when a rule blocks their action. All messages use MiniMessage format, which supports colors, gradients, bold, italic, hover text, and more. You can preview and build MiniMessage strings at webui.advntr.dev. Setting a message to an empty string ("") suppresses it entirely.

MiniMessage Format

MiniMessage is a text format used by Paper and Adventure-based plugins. Build your messages interactively at webui.advntr.dev.

Tag Result
<red>text</red>Red text
<gold>text</gold>Gold text
<bold>text</bold>Bold text
<#FF4400>text</>Custom hex color
<gradient:#FF0000:#0000FF>text</gradient>Color gradient

AreaNotification/Rules.yml

Controls messages for basic rule violations.

AreaNotification/Rules.yml — Default values
no_break:              "<red>You cannot break blocks in this area.</red>"
no_place:              "<red>You cannot place blocks in this area.</red>"
no_place_fluid:        "<red>You cannot place fluids in this area.</red>"
no_interact:           "<red>You cannot interact in this area.</red>"
no_interact_entity:    "<red>You cannot interact with entities in this area.</red>"
no_interact_vehicle:   "<red>You cannot mount vehicles in this area.</red>"
no_interact_inventory: "<red>You cannot open inventories in this area.</red>"
no_pvp:                "<red>You cannot attack players in this area.</red>"
no_entityattack:       "<red>You cannot attack entities in this area.</red>"
no_drop:               "<red>You cannot drop items in this area.</red>"
no_collect:            "<red>You cannot pick up items in this area.</red>"

# Set to "" to send no message for barrier collisions
no_entry_collision:    ""
no_exit_collision:     ""
no_exit_returned:      ""
Key When triggered
no_breakPlayer tries to break a block.
no_placePlayer tries to place a block.
no_place_fluidPlayer tries to place water or lava with a bucket.
no_interactPlayer tries to interact with a block (container, button, etc.).
no_interact_entityPlayer tries to right-click an entity.
no_interact_vehiclePlayer tries to mount a vehicle (boat, minecart, horse).
no_interact_inventoryPlayer tries to open an entity's inventory (chest minecart, etc.).
no_pvpPlayer tries to hit another player.
no_entityattackPlayer tries to hit a non-player entity.
no_dropPlayer tries to drop an item.
no_collectPlayer tries to pick up an item.
no_entry_collisionPlayer is physically stopped by a no_entry barrier.
no_exit_collisionPlayer is physically stopped by a no_exit barrier.
no_exit_returnedPlayer is teleported back into the area after escaping a no_exit area.

AreaNotification/AdvancedRules.yml

Controls messages for advanced rule violations. These support placeholders that are replaced with the actual block, entity, or item involved in the action.

AreaNotification/AdvancedRules.yml — Default values
no_break_specific:       "<red>You cannot break <gold>{blockid}</gold> in this area.</red>"
no_place_specific:       "<red>You cannot place <gold>{blockid}</gold> in this area.</red>"
no_place_fluid_specific: "<red>You cannot place <gold>{blockid}</gold> in this area.</red>"
no_interact_block:       "<red>You cannot interact with <gold>{blockid}</gold> in this area.</red>"
no_interact_entity:      "<red>You cannot interact with <gold>{entityid}</gold> in this area.</red>"
no_interact_vehicle:     "<red>You cannot mount <gold>{entityid}</gold> in this area.</red>"
no_interact_inventory:   "<red>You cannot open the inventory of <gold>{entityid}</gold>.</red>"
no_drop_specific:        "<red>You cannot drop <gold>{itemid}</gold> in this area.</red>"
no_collect_specific:     "<red>You cannot pick up <gold>{itemid}</gold> in this area.</red>"

Available Placeholders

Placeholder Value Example
{blockid}The full Minecraft block ID including namespace.minecraft:stone
{block}The block name without the minecraft: prefix.stone
{entityid}The full Minecraft entity type ID including namespace.minecraft:villager
{entity}The entity name without the minecraft: prefix.villager
{itemid}The full item ID (same as block ID for block items) including namespace.minecraft:diamond
{item}The item name without the minecraft: prefix.diamond
{areaid}The area identifier.spawn
{player}The player's name.Marquinho

Mod Verification

The plugin can optionally require all players to have the client mod installed. When enforcement is enabled, the server sends a verification packet to each player on join. Players who do not respond with the correct handshake within a short window are kicked with the configured message.

Verification Flow

  1. Player joins

    The ModVerificationListener detects the join event and sends a verification packet to the client.

  2. Client responds

    If the client mod is installed, it automatically sends back a verification response on the protectedarea:main channel.

  3. Server evaluates

    Players who respond correctly are marked as verified and continue normally. Players who do not respond (e.g. vanilla clients) are kicked with the message defined in Config/Config.yml.

Commands

Command Description
/area mod-requiredDisplay current enforcement status and the kick message.
/area mod-required trueEnable enforcement. Players without the mod are kicked on join.
/area mod-required falseDisable enforcement. The mod becomes optional.
/area reload configReload Config.yml to pick up manual edits.

Configuration

Config/Config.yml
mod-required: true
kick-message: "§cYou need the ProtectedArea client mod to play on this server."

The kick message supports legacy Minecraft color codes using the § character. It is shown on the connection-refused screen and supports multiple lines using \n.