Creating protections
Let players protect land by placing a core or by selecting two corners, set the tiers, prices and limits, and move, pick up or delete a protection.
A protection is a box of blocks with an owner. Players make one by placing a core (a block bought in the shop or handed out by staff) or by selecting two corners with a selector. Both run the same checks and end in the same kind of protection; a selected one simply has no core block.
Before you start#
- Placing cores needs
cores.enabled(on by default). Selecting needsselection.enabled, which is off by default, and PacketEvents. - The shop and the selection price charge through your economy, see Economy. Cores handed out with
/protectionsadmin giveneed none. - Edit
config.ymlin the plugin folder, or use the in-game admin menu. Colours in names and lore are explained in Colours.
Placing a core#
Get a core
A player runs /protections and clicks Shop, then the tier they want. Staff can instead run /protectionsadmin give <player> <tier> [amount], 1 to 64 at a time.
Place it
The player places the core block where the protection should be centred. The land around it is protected at once.
Open it
Right-click the core to open the protection's screen and add friends, see People and access.
A core that does not fit in the inventory when bought is kept and delivered the next time the player joins. A new protection is named <player>'s land #<number> (the default-name line of messages.yml), where the number is how many the player owns plus one. Its home starts where the player stands, and with visualization.show-on-create on its border is drawn to them at once.
Why a core is refused#
The core stays in the hand when any of these fails:
cores.enabledis on.- The player may place a block there. Inside somebody else's protection they need
placethere. - The item's tier still exists in
tiers. A core of a deleted tier is refused with "There is no protection tier called …". - The tier's
permission, if it has one. - The world is not in
settings.disabled-worlds(world_the_endby default). - The limits.
- The land overlaps no other owner's protection and keeps its distance, see Overlap and distance.
- The land lies inside the world border ("That land reaches past the world border.").
- With WorldGuard enabled, the land overlaps no WorldGuard region other than this plugin's own, the global region and the ones in
settings.allowed-world-guard-regions. This is checked in both backends.
The checks run once before the block goes down, so it can be refused, and again once no other plugin cancelled it. If something changed in between, the block is removed and the core handed back.
A core that grows your own land#
With submodules.merge on (off by default), a new core whose land touches or overlaps one of the player's own protections in the same world does not make a second protection. That protection grows to the box holding both, and the core is spent. The player is told "The new core joined … » <size>", the log records a merge entry "grown by a new core", and with visualization.show-on-create the new border is drawn.
When a core grows land, and when it does not
It only happens when the grown box overlaps no other owner's protection, keeps settings.min-distance from other owners' land and overlaps no foreign WorldGuard region; otherwise the core makes a protection of its own as usual. The core's tier permission is still asked.
It is refused, and the core stays in the hand, while that protection is for sale or offered for rent ("listed"), or under attack, raidable, abandoned or rented. The grown protection keeps its own tier, level, members and settings. The limits are not counted, since no protection is added. A carried (picked-up) core never grows anything: it rebuilds its own protection. If the change cannot be written, the core is handed back.
Right-clicking a core#
A member of the protection right-clicking its core with the main hand opens that protection's screen. Sneaking skips it, so blocks can still be placed against the core.
Protecting by selection#
Use this on a server without cores, or alongside them. Turn on selection.enabled in config.yml (and cores.enabled: false for a selection-only server).
Open the selector
The player runs /protections and clicks Select land. The button shows only while selection.enabled is on and the player has exyliaprotections.select (everybody, by default).
Mark the corners
Left-click one corner, right-click the other. The shortest side must be at least selection.min-side (9) blocks.
Confirm
Shift + left-click to confirm, or drop the selector to cancel. The player sees the area and the price and accepts it.
A 20x20 selection covers 400 blocks and costs 2000 at the default price of 5 per block. Everything a placed core checks is checked when the player confirms the corners, and again after they accept the price, right before they are charged.
The selector is sent with PacketEvents as an item only that player's client sees. It never reaches the real inventory, so it cannot be dropped for someone else, stored in a chest or sold. Without PacketEvents the selection is refused with "Protecting land by selection is not available."
A selected protection has no core block: it cannot be picked up or hidden, only moved or deleted. Its home is where the player stood when they confirmed. It counts against selection.tier's limit, and the player must hold that tier's permission when it has one. With raids on and raids.selection-cores on, selected land gets a core on the surface at its centre so it can be raided, see Raids.
If the new protection cannot be saved to the database, it is undone: the land is unprotected again, a placed core or the selection price goes back to the player, and they are told to try again.
Selection keys in config.yml
| Key | Default | What it does |
|---|---|---|
selection.enabled | false | Whether players may protect land by selection. |
selection.tier | medium | The tier a selection counts as: for the tier's limit and its starting flags. |
selection.height | FULL | FULL protects the whole column of both corners. NORMAL protects only the blocks between the two corners' heights. |
selection.price-per-block | 5 | Price per block of area (width × length, whatever the height). |
selection.currency | blank | Blank is the default currency. |
selection.min-side | 9 | The shortest side a selection may have. |
selection.max-area | 10000 | The largest area it may cover. A player's highest exyliaprotections.select.area.<n> replaces it. |
selection.full-height-tool | GOLDEN_HOE | The selector used for full-height selections. |
selection.normal-height-tool | GOLDEN_AXE | The selector used for NORMAL selections. |
Both selector tools are also used for plots.
Check that it works#
- Run
/protectionsas a normal player (not an operator) and click Shop (cores) or Select land (selection). If the button is missing, the matching switch is off or no tier has a price. - Get a core and place it. Run
/protectionsagain: My protections lists it and the hub shows how many you own out of your limit. - Try a second core 3 blocks from the first one with another player: it must be refused for overlap or distance.
Change the tiers#
A tier is a kind of core: the block it is, the land it protects, its price and the flags a new protection starts with. tiers in config.yml holds them, keyed by tier id. Three ship:
| Tier | Block | radius | Area | Shop price |
|---|---|---|---|---|
small | AMETHYST_BLOCK | 10 | 21x21 | 2500 |
medium | PURPUR_BLOCK | 20 | 41x41 | 10000 |
large | CRYING_OBSIDIAN | 35 | 71x71 | 40000 |
The radius is counted on every side of the core, so a side is radius × 2 + 1 blocks. All three ship with height: FULL, no permission, no limit of their own and the default currency.
Tiers can be edited in game from the tier editor, which writes the same keys. To hide a tier from the shop, set its price to 0. To make it VIP only, give it a permission.
A new protection copies the roles section and its tier's flags at that moment. Editing either later changes the protections made afterwards, never the ones that already exist.
Every tier key
| Tier key | Default for a new tier | What it does |
|---|---|---|
material | AMETHYST_BLOCK | The core block and item. Anything that is not a placeable block falls back to AMETHYST_BLOCK. |
name | {primary}&lPROTECTION CORE | The item's name. The shipped tiers read PROTECTION CORE [SMALL] and so on. |
lore | empty | The item's lore. The shipped tiers describe the area and say the height is full. |
radius | 10 | Blocks protected on every side of the core. |
height | FULL | FULL protects the whole column, from the world's floor to its ceiling. CUBOID protects only y-radius blocks above and below the core. |
y-radius | 10 | Used by CUBOID only: the protection is y-radius × 2 + 1 blocks tall. |
price | 0 | Price in the shop. 0 keeps the tier out of the shop. |
currency | blank | Which currency the shop charges. Blank is the default currency. |
permission | blank | Needed to place the core, and to buy it from the shop. Blank for none. |
limit | 0 | How many protections of this tier one player may own. 0 for no limit of its own. |
flags | none | The flags a new protection of this tier starts with on. Every flag left out starts off. |
The shipped tiers start with mob-spawning, crop-growth, leaf-decay, liquid-flow, visitor-entry, mob-damage, fall-damage, hunger, block-spread, snow-ice, item-drop, item-pickup and ender-pearl on, and pvp, explosions, fire-spread, mob-griefing and crop-trample off. Updating from a config.yml older than version 7 adds the eight flags that keep vanilla behaviour (mob-damage to ender-pearl in that list) to every existing tier, so new protections behave as before. The flags themselves are on People and access.
Lives per tier live in raids.tier-lives and upkeep per tier in upkeep.tier-costs, not inside the tier.
How the shop works
/protections → Shop (title PROTECTION SHOP) lists every tier with a price above 0, with its area, its height and its price. The button is hidden while no tier has a price, or while cores.enabled is off; opening the shop then answers "Protection cores are turned off on this server." Clicking a tier:
- Refuses it when the tier has a
permissionthe player lacks. - Charges the price in the tier's currency, and refuses when the player cannot pay.
- Hands over one core.
| Key | Default | What it does |
|---|---|---|
cores.enabled | true | Whether placing a core protects land. Off: cores cannot be placed or bought, and protections already made with one keep working. |
Limits#
Three limits apply to a new protection, whether placed or selected. A moved protection is not counted against them again.
| Limit | Where it is set | What it counts |
|---|---|---|
| Protections per player | The highest exyliaprotections.limit.<n> the player holds, or settings.default-limit (3) without one | Every protection they own, on every server. |
| Per tier | The highest exyliaprotections.limit.<tier>.<n> the player holds, or the tier's limit without one. 0 is no limit of its own | Their protections of that tier, on every server. |
| Per world | settings.world-limits, a map of world name to number | Their protections in that world on this server. A world left out has no limit of its own. |
settings:
default-limit: 3
world-limits:
world: 2
world_nether: 1To give VIPs more, grant exyliaprotections.limit.10 in your permissions plugin. exyliaprotections.limit.0 is a limit like any other: a player holding only that node may own no protections. default-limit only applies to a player holding no limit node at all. The old exyliasurvivalcore.protections.limit.<n> prefix is no longer read. Members of a protection do not count it against their own limit; only its owner does.
Overlap and distance#
| Rule | Applies to |
|---|---|
| Land never overlaps another owner's protection. | Protections of other owners whose heights overlap the new land. |
At least settings.min-distance (8) blocks of land between them, horizontally. | Protections of other owners, whatever heights both cover, so land stacked above or below cannot reach a core from beside it. |
A player's own protections may touch and even overlap, so a new core need not find the exact edge of their land. Where two of them overlap, a core block belongs to its own protection, and every other block to the oldest of them. Water, lava, pistons, redstone, growth and spreading cross freely between one owner's protections, so a farm can span several of them; across the border with anybody else's land, they never do.
With min-distance at 0, a CUBOID or NORMAL protection can sit directly above or below another owner's, as long as their height ranges do not share a single block. Every protection on the network is one database row, but the overlap and distance rules only compare protections of the server and world the new land is on, while limits count every server.
Height#
| How it was made | Height |
|---|---|
Core of a FULL tier | The whole column, from the world's minimum height to its maximum. |
Core of a CUBOID tier | y-radius blocks above and below the core. |
Selection with selection.height: FULL | The whole column. |
Selection with selection.height: NORMAL | From the lower corner to the higher one. |
The selection's height comes from selection.height alone, not from the tier it counts as. Level upgrades widen a protection by a radius bonus, see Economy. A protection grown by a new core keeps the grown box.
Pick up, hide, move or delete#
Four actions on an existing protection. None of them work while it is under attack, raidable or rented. On an abandoned protection the owner is asked whether to pay its upkeep first and go on. Picking up and deleting are also refused while upkeep is due.
Pick up. The owner breaks their own core and confirms. They get back an item that rebuilds the same protection wherever it is placed: its name, roles, members, clans, overrides, flags, bans, plots, level and the exact box it covered. The bank is paid out to the owner, a public warp is taken down, and a sale ends. The level is clamped to the tier's highest, plots that would stick out of the new spot are dropped, and nothing a tenant rented survives. A carried core placed again owes its next upkeep period at once.
Anybody else breaking a core is refused, or, with raids on and the player an enemy, hits it. Explosions, pistons, fire and liquids never touch a core.
Hide removes the core block and keeps the land protected; showing it puts it back. It needs manage-core and the player standing on the protection's server and world. While raids are on, a core can only be hidden with raids.allow-hidden-core.
Move puts the core on top of the block the player looks at, within five blocks, in the same world. The whole protection moves with it, same shape and size. It needs manage-core, runs every placement check except the limits, costs settings.move-price (1000) in settings.move-currency, and moves the home to where the player stands. A public warp moves with it, to the new home. If the move cannot be written, the price is paid back.
Delete, from the protection's screen, is the owner's alone and asks for confirmation. The core block is removed and handed back to the owner as a blank core of its tier (a selected protection has none to return), and the bank goes to the owner, after paying back any tenant for the time they had left.
A player with exyliaprotections.admin (operators, by default) passes every "owner only" check. Breaking another player's core asks them to pick it up, and confirming hands them the carried core.
Something missing on this page? Tell us on Discord