Content generated with AI — it may contain mistakes.

Protections

Protections

Land protected by a core block or a selection: tiers, the internal and WorldGuard backends, roles, flags, bans, lock, logs, plots, perks, warps, map markers, time and weather, and merging.

The protections module lets players protect land. A protection is a box of blocks with an owner, members, roles and flags, made by placing a core block or by selecting two corners. The module enforces it itself, whichever backend is chosen.

Every protection on the network is one database row, and every server keeps all of them in memory. A player's list and their limits count every server; only the server a protection belongs to enforces it, draws it and mirrors it to WorldGuard. A change made on one server is announced and re-read by the others.

Raids, lives and siege windows are on Protection raids. Banks, upkeep, the market, rent and level upgrades are on Protection economy. The admin menu, the tier editor, the ProtectionStones import and the inactive cleanup are on Administering protections.

Settings live in modules/protections/config.yml, messages in the protections section of messages.yml, and the screens in modules/protections/menus/.

Features

submodules turns whole features off. A feature that is off hides its buttons, refuses its commands and stops acting.

KeyDefaultFeatureDocumented on
banstrueOwners ban playersthis page
locktrueOwners lock a protection to membersthis page
enter-leavetrueTitles and sounds walking in and out, greetings and farewellsthis page
logstrueAudit logthis page
visualizationtrueDrawing borders, BlueMap and Dynmap markersthis page
subregionsfalsePlots inside protectionsthis page
warpsfalseProtections published as public warpsthis page
effectsfalseMember perksthis page
environmentfalseTime and weather insidethis page
mergefalseMerging two protections that touchthis page
raidsfalseLives, core health, siege windowsProtection raids
bankfalseA shared bank per protectionProtection economy
upkeepfalseUpkeep and abandonmentProtection economy
marketfalseSelling and giving protections awayProtection economy
rentfalseRenting plots and protectionsProtection economy
upgradesfalseLevel upgradesProtection economy

Tiers and the core

A tier is a kind of core: its block, its item, the land it protects and the flags a new protection starts with. tiers in the config holds them, keyed by tier id. Three ship:

TierBlockRadiusAreaShop price
smallAMETHYST_BLOCK1021x212500
mediumPURPUR_BLOCK2041x4110000
largeCRYING_OBSIDIAN3571x7140000

The area is the radius on every side of the core, so a side is radius × 2 + 1 blocks.

Tier fieldDefaultWhat it does
materialAMETHYST_BLOCKThe core block. Anything that is not a placeable block falls back to AMETHYST_BLOCK
name, loreThe core item's name and lore
radius10Blocks protected around the core
heightFULLFULL protects the whole column; CUBOID only y-radius blocks above and below the core
y-radius10Used by CUBOID only
pricePrice in the protection shop; 0 keeps the tier out of it
currencyblankBlank is the default currency
permissionblankNeeded to place the core, and to buy it; blank for none
limit0How many of this tier one player may own; 0 for no limit of its own
flagssee belowThe flags a new protection of this tier starts with on

The shipped tiers start with mob-spawning, crop-growth, leaf-decay, liquid-flow and visitor-entry on, and pvp, explosions and fire-spread off.

Cores come from the protection shop button of /protections, which lists every tier with a price above 0, or from /protections admin give. Tiers can be edited in game from the tier editor.

Roles and flags are copied when a protection is made

A new protection copies roles and its tier's flags at that moment. Editing either later changes the protections made afterwards, never the ones that already exist.

Placing a core

Placing a core item protects the land around it. The placement is refused, and the block stays in the hand, when any of these fails:

  1. The tier's permission, if it has one.
  2. The world is not in settings.disabled-worlds — world_the_end by default.
  3. The player owns fewer protections than their limit. The limit is the highest exyliasurvivalcore.protections.limit.<n> they hold, or settings.default-limit (3) without one. It counts every server.
  4. The player owns fewer of this tier than the tier's limit.
  5. The player owns fewer protections in this world, on this server, than settings.world-limits sets for it. A world left out has no limit of its own.
  6. The land overlaps no other protection, whoever owns it.
  7. The land is at least settings.min-distance (8) blocks, horizontally, from any protection of another owner. A player's own protections may touch.
  8. With WorldGuard enabled, the land overlaps no WorldGuard region other than this module's own, the global region, and the ones listed in settings.allowed-world-guard-regions. This is checked in both backends.

Placing a core is also placing a block, so it cannot be done inside somebody else's protection without place there. The protection's home starts where the player stands, and its name is %player%'s land #%number% until renamed.

Protecting by selection

With selection.enabled and the node exyliasurvivalcore.protections.select, the select land button of /protections hands the player a selector. They mark two corners, confirm with shift + left-click, and are asked to pay.

KeyDefaultWhat it does
selection.enabledtrueWhether players may protect land by selection
selection.tiermediumThe tier a selection counts as, for its limit, height and flags
selection.price-per-block5Price per block of area
selection.currencyblankBlank is the default currency
selection.min-side9The shortest side a selection may have
selection.max-area10000The largest area it may cover

A 20x20 selection costs 2000. With a FULL tier the whole column is protected; with a CUBOID tier only the heights selected. The same placement checks apply, and are asked again after the player confirms. A selected protection has no core block: it cannot be picked up or hidden, only moved or deleted.

Picking up, hiding, moving, deleting

Picking up. The owner breaking their own core is asked to confirm, and gets an item back that rebuilds the same protection wherever it is placed: its name, roles, members, clans, flags, bans, plots, level, perks and the exact box it covered. What the bank held is paid to the owner, a public warp is taken down, and a sale ends. Anybody else breaking a core is refused — or, with raids on and the player an enemy, hits it.

Hiding removes the core block and keeps the land protected. It needs manage-core, standing on the protection's server and world. While raids are on, a core can only be hidden with raids.allow-hidden-core.

Moving puts the core on top of the block the player looks at, within five blocks, in the same world, and the whole protection moves with it, same shape and size. It needs manage-core, passes every placement check except the limits, costs settings.move-price (1000) in settings.move-currency, and moves the home to where the player stands.

Deleting, from the manage screen, is the owner's alone. The core block is removed and the bank paid to the owner.

A protection under attack, raidable, abandoned or with tenants cannot be picked up, moved or deleted by its owner.

Backends

settings.backend picks how protections reach other plugins.

BackendWhat happens
INTERNALDefault. This module enforces everything and nothing else sees the protections
WORLDGUARDEvery protection of this server is also a WorldGuard region, so other plugins see it. Roles, clans and overrides are still enforced by this module

Change it with /protections admin migrate <INTERNAL|WORLDGUARD>, which writes the key and moves every region over: WORLDGUARD creates the regions, INTERNAL removes every region this module made from every loaded world. A reload applies the key as the file holds it. Asking for WORLDGUARD on a server without WorldGuard runs INTERNAL and logs a warning; the details are on Administering protections.

What a mirrored region holds:

RegionValue
Idsc_ps_ and the protection's id without dashes
Prioritysettings.worldguard-priority (10)
OwnerThe protection's owner
MembersIts members, and every member of each clan added
pvp, mob-spawning, fire-spread, crop-growth, leaf-decayALLOW or DENY from the flag of the same name
tnt, creeper-explosion, other-explosionFrom explosions
water-flow, lava-flowFrom liquid-flow
entryDENY to non-members while visitor-entry is off
buildALLOW while it is raidable

With plots on, each plot is a child region <region>_<plot>, one priority above, with its own members and flags.

Clan members reach WorldGuard late

A region's clan members are the clan as it was when the protection last changed or the server started. Somebody who joins the clan afterwards builds through this module at once, but WorldGuard only learns of them at the next change.

Roles and member permissions

A protection has roles, each a set of permissions. A player's rights resolve in this order:

  1. The owner may do everything.
  2. An override set for that player alone, allow or deny, wins.
  3. Otherwise the player's own role.
  4. Otherwise the role given to their clan.
  5. Anybody left is a visitor, and has what the visitor role grants — nothing by default.

New protections start with three roles:

roles:
  member:
    permissions: [break, place, containers, doors, redstone, buckets, animals, ride,
                  decorations, trade, leash, bank-deposit]
  trusted:
    permissions: [break, place, containers, doors, redstone, buckets, animals, ride,
                  decorations, trade, leash, manage-members, set-home, bank-deposit]
  visitor:
    permissions: []
PermissionWhat it allows
breakBreak blocks, trample farmland, damage minecarts and boats
placePlace blocks and signs, use spawn eggs, bone meal, flint and steel and fire charges, place entities, use clickable blocks that hold no inventory
containersOpen chests, furnaces, shulkers and anything else with an inventory, lecterns, jukeboxes and chiseled bookshelves
doorsDoors, trapdoors and fence gates
redstoneButtons, levers, pressure plates, repeaters, comparators, daylight detectors, note blocks
bucketsFill and empty buckets
animalsHurt, interact with and shear animals and other passive mobs
rideMount horses, boats and minecarts
decorationsPlace, break and use item frames, armor stands and paintings
tradeTrade with villagers
leashLeash and unleash mobs
manage-membersAdd and remove members and clans, choose their role, set overrides
manage-rolesCreate, rename, delete and edit roles
edit-flagsChange the flags
renameRename the protection, edit its greeting and farewell
set-homeMove the home to where they stand
manage-coreHide or move the core
manage-bansBan and unban players
toggle-lockLock and unlock
view-logsRead the audit log
bank-deposit, bank-withdrawUse the bank
manage-subregionsCreate, edit and delete plots
manage-rentOffer the land and its plots for rent
manage-warpPublish and edit the public warp
edit-environmentChange the time and weather inside

Hostile mobs are never protected. The role screens only offer permissions whose feature is on.

Members. The members screen adds a player who has played on the network, or a clan by its tag when a clan plugin is present, and asks which role they get. Role names use up to 16 of a-z, 0-9, - and _, and cannot be owner. The visitor role cannot be renamed or deleted. Deleting a role removes everybody who held it, in the protection and in its plots.

Some things no role grants. Nobody but the owner edits the role they hold themselves, or their own overrides. Opening the manage screen and teleporting home need membership; deleting, picking up the core, selling, giving away, upgrading, merging and turning perks on are the owner's alone.

Operators do not build in other players' land

exyliasurvivalcore.protections.admin — which operators hold — opens every screen, enters every protection and counts as the owner in the menus and commands. It does not let anybody break, place or use anything inside. Only exyliasurvivalcore.protections.bypass, explicitly granted, does; an operator without it set is treated like anyone else.

Flags

A flag is the land's own switch. It applies to everybody inside, members or not.

FlagWhile it is off
pvpPlayers cannot hurt each other when either stands in land with it off
mob-spawningNo natural spawns: natural, jockeys, patrols, reinforcements, invasions, raids, traps
explosionsExplosions break no blocks and no hanging decorations
fire-spreadFire does not spread or burn blocks, and nothing but a player's flint and steel lights it
liquid-flowWater and lava do not flow
crop-growthCrops and plants do not grow
leaf-decayLeaves do not decay
visitor-entryNon-members cannot walk in: the protection is locked

Two rules hold whatever the flags say: liquids never flow into a protection from outside it, and pistons never move a block into, out of or across a protection other than their own. A player lighting a fire needs place.

settings.deny-message-cooldown-millis (1500) is how long a player waits between two "this land is protected" messages.

Bans

With submodules.bans, manage-bans bans a player from the protection: they are pushed out and cannot walk or teleport in — ender pearls, chorus fruit, commands, plugins and spectating are all stopped. Logging in or respawning inside pushes them just past the nearest border.

/protections ban <player> [duration] [reason] or the bans screen. The duration is 30m, 2h, 7d or permanent (also perm, forever); nothing at all is permanent. A reason needs a duration before it. bans.reason-max-length is 64, and a reason is stored as plain text. The owner, members, tenants, and online players with the admin or bypass node cannot be banned.

A ban applies even while the protection is open to visitors. A raid running, or an abandonment, opens the land to everybody whatever its bans or lock say.

Lock

With submodules.lock, toggle-lock locks a protection so only the owner, members and plot members may enter. Locking is turning visitor-entry off; /protections lock toggles it.

Turning the lock feature off does not stop locking

submodules.lock: false hides the lock button and refuses /protections lock, but the visitor-entry flag stays on the flags screen. Anybody with edit-flags can still lock the land from there.

Enter and leave messages

With submodules.enter-leave, walking into a protection shows a title and walking out an action bar. rename lets a member write the protection's own greeting and farewell, up to enter-leave.message-max-length (64) characters of plain text; clearing them brings back the defaults.

KeyDefault
enter-title{primary}&l%name% over %message%
enter-actionbarempty
enter-soundBLOCK_AMETHYST_BLOCK_CHIME|0.6|1.4
leave-titleempty
leave-actionbar%message%
leave-soundempty
cooldown-millis1500 — crossing again within it shows nothing
show-to-memberstrue — off shows them to visitors only

Placeholders: %name%, %owner% and %message%, which is the owner's greeting or farewell, or protections.enter-default / protections.leave-default from messages.yml ("Owned by %owner%", "« You left %name%"). Stepping straight from one protection into another only greets. Stepping into a plot shows the plot's name in the action bar. Players can mute all of it with the protection-messages switch of player settings.

Audit logs

With submodules.logs, every protection keeps a history. view-logs opens it from the manage screen or /protections logs, filtered by action and by player.

Logged actions: break, place, container, member, role, flag, ban, lock, core, settings, raid, bank, upkeep, market, subregion, rent, upgrade, warp, merge. Blocks broken and placed and containers opened (chests, barrels, shulkers, furnaces, blast furnaces, smokers, hoppers, dispensers, droppers, brewing stands) are only what actually happened; everything else is a change made through a screen or a command. Each entry keeps who, what, where, which server and when.

KeyDefaultWhat it does
logs.retention-days14Days an entry is kept; 0 keeps them forever
logs.flush-seconds10Seconds between two writes of the queued entries
logs.skip-actions[]Actions not logged; everything else is, including actions added later
logs.owner-blocksfalseWhether the owner's own blocks and containers are logged
logs.menu-rows500The most recent entries the logs screen reads
`logs.actions` became `logs.skip-actions`

Version 1 of the file listed what was logged. When it is loaded, every action version 1 knew and the old list left out is written to logs.skip-actions, and logs.actions is removed.

The player filter searches the latest entries only

The logs screen reads the newest logs.menu-rows entries first and filters those. An older entry of a player is not found by filtering for them.

Plots

With submodules.subregions, manage-subregions splits a protection into plots: boxes inside it with members, overrides and flags of their own. /protections subregion create or the plots screen hands out a selector, standing on the protection's server and world, then asks the plot's name — up to 16 of a-z, 0-9, - and _.

KeyDefaultWhat it does
subregions.max-per-protection3Plots one protection holds while upgrades are off; 0 for no limit. With upgrades on the level decides
subregions.min-side3The shortest side a plot may have
subregions.full-heighttrueA plot spans the protection's whole height; off, only the heights selected

A plot must lie fully inside the protection and overlap no other plot.

  • Plot members hold one of the protection's roles inside that plot only, with overrides of their own there. A plot member may walk into a locked protection.
  • Plot flags follow the protection, or are set on or off for the plot. visitor-entry is the protection's alone.
  • A private plot lets only its members, and those with manage-subregions, act inside it. A shared plot lets everybody else fall back to their rights in the protection.

Plots are kept as offsets from the core, so they move and travel with it. A rented plot cannot be deleted. /protections subregion info describes the plot a player stands in, and /protections subregion delete <name> removes one.

Member perks

With submodules.effects, members standing in their protection get perks: fly, no-hunger, keep-inventory, and the potion effects of effects.potions. A tier unlocks perks level by level, each level keeping every perk of the ones below; the owner turns on the unlocked ones from the perks & atmosphere screen.

effects:
  potions:
    night-vision: NIGHT_VISION 0
    haste: HASTE 0
    speed: SPEED 0
    jump-boost: JUMP_BOOST 0
  tiers:
    small:
      levels:
        '0': { perks: [night-vision] }
        '1': { perks: [haste, no-hunger] }
        '2': { perks: [speed, fly] }
    medium:
      levels:
        '0': { perks: [night-vision, haste] }
        '1': { perks: [no-hunger, speed] }
        '2': { perks: [fly, keep-inventory] }
    large:
      levels:
        '0': { perks: [night-vision, haste, no-hunger] }
        '1': { perks: [speed, fly] }
        '2': { perks: [keep-inventory, jump-boost] }

A potion is EFFECT amplifier, the amplifier counting from 0. Levels come from upgrades; a protection never upgraded is level 0.

KeyDefaultWhat it does
effects.tenantsfalseWhether tenants get the perks of what they rent
effects.fall-protection-seconds5Seconds without fall damage after flight stops
effects.no-flight-during-siegetrueWhether flight stops while a siege window is open

Who gets them: the owner, members and clan members — not while the protection is raidable or abandoned. Perks are worked out again when a player changes protection and every five seconds. Flight is only given to a player who could not already fly, and only that flight is taken back. keep-inventory keeps the inventory and the experience of a member dying in the protection that gave it.

Only the owner turns perks on

The perks screen opens for the owner and for edit-environment, but a perk switch answers only the owner. edit-environment holders change the time and weather there, nothing else.

Time and weather

With submodules.environment, edit-environment sets what everybody standing inside sees — members or not. Each click moves to the next value.

SettingValues
Timethe world's own → day → noon → sunset → night
Weatherthe world's own → clear → rain

The time is fixed while they stay; walking out gives them the world's back.

Public warps

With submodules.warps, manage-warp publishes a protection as a warp anybody may visit and rate. It needs a home, and lands there; land here moves it to where the player stands inside. The warp has a name, an icon and a description, stored as plain text.

/protections warps lists them, sorted by visits, rating or newest. /protections warp <name> goes to one; when names clash, the most visited wins. Visiting uses the home warmup.

KeyDefaultWhat it does
warps.name-max-length24The longest name
warps.description-max-length64The longest description
warps.hide-unavailabletrueWhether warps a player cannot enter right now — locked, banned, raidable, abandoned — are hidden from them. Off: listed, and the visit refused
warps.default-iconLODESTONEThe icon a new warp starts with

A visit counts once per player per day, whichever server they arrive from; members' visits do not count. Ratings are one to five stars, one per player, rated again to change; nobody rates their own warp. Unpublishing a warp, or deleting its protection, deletes its visits and ratings.

Borders and web maps

With submodules.visualization, members see a protection's border with the show border button or /protections show: particles along its edges and its plots', in a band around the player's eyes.

KeyDefaultWhat it does
visualization.seconds10Seconds a border stays drawn
visualization.particleEND_RODThe protection's border
visualization.plot-particleWAX_OFFA plot's border
visualization.show-on-createtrueDraw the border to whoever protects new land
visualization.bluemaptrueDraw protections on BlueMap when it is installed
visualization.dynmaptrueDraw protections on Dynmap when it is installed
visualization.map-refresh-minutes5Minutes between two redraws of every marker
visualization.map-label%name% (%owner%)A marker's label
visualization.map-colorssee belowMarker colours by state, in hex

On the web maps every protection is a box in a marker set called Protections, redrawn whenever it changes and all of them every few minutes, which picks up sales, rents and raids. Each server draws its own protections. The colour is the most urgent state:

StateDefault
raidable#a33b53
abandoned#6c757d
for-sale#8fffc1
for-rent#59a4ff
normal#8a51c4
The map hooks are made when the module enables

Whether BlueMap and Dynmap are drawn on, and map-refresh-minutes, are read when the module enables, as is logs.flush-seconds. A reload does not apply a change to them; a restart does.

Merging

With submodules.merge, the owner joins two of their protections that touch into one, from the merge button or /protections merge, standing in the one that stays. The screen lists the owner's protections on this server that touch it.

The box holding both becomes the land. The merge is refused when that box would reach any other protection, come closer than settings.min-distance to another owner's, or overlap a foreign WorldGuard region, and while either protection is for sale, for rent, under attack, raidable, abandoned or rented.

What the merged protection keeps:

  • Its own name, home, core, tier, flags, greeting, farewell, perks, time, weather and rents.
  • The roles, members, clans, overrides and bans of both; where both say something about the same key, the one kept wins.
  • Every plot of both; a plot whose name is taken gets -2, -3… added.
  • The higher level of the two, and the raid state of whichever has fewer lives left.
  • The other one's bank, moved over before the land is joined.

The other protection's core is removed and not given back, and its warp is taken down.

Screens

/protections opens the list of every protection the player owns or belongs to, on any server, with buttons for selecting land, the protection shop, the market, rent and warps. A protection opens its manage screen, where each button appears only while its feature is on: teleport home, set home, rename, logs, members, roles, flags, greeting & farewell, lock, bans, lives, hide core, move, delete, bank, upkeep, sell or give away, plots, upgrade, rent out, show border, public warp, perks & atmosphere, and merge.

Every click is checked again against the protection as it is when the click arrives.

Commands

Every command below needs exyliasurvivalcore.protections. /ps and /claims are aliases. Commands that act on "the protection here" use the one the player stands in.

CommandWho mayWhat it does
/protectionsanyoneThe list of their protections
/protections home [name]members, tenantsTeleport home, with settings.home-warmup-seconds (3) of warmup. No name with more than one protection opens the list
/protections infoanyoneName, owner, their role, size and members of the protection here
/protections ban <player> [duration] [reason]manage-bansBan from the protection here
/protections unban <player>manage-bansLift a ban
/protections locktoggle-lockLock or unlock
/protections logsview-logsThe audit log
/protections showmembersDraw the border
/protections mergeownerPick a protection to merge into this one
/protections warpsanyoneThe public warps
/protections warp <name>anyoneVisit a warp
/protections subregion createmanage-subregionsSelect a new plot
/protections subregion delete <name>manage-subregionsDelete a plot
/protections subregion infoanyoneThe plot here

The bank, upkeep, market, sell, transfer, rent and upgrade commands are on Protection economy; the admin commands on Administering protections.

Placeholders

PlaceholderValue
%exyliasurvivalcore_protections_count%Protections the player owns, on every server
%exyliasurvivalcore_protections_max%How many they may own: their limit node, or settings.default-limit
%exyliasurvivalcore_protections_name%The protection they stand in; blank outside one
%exyliasurvivalcore_protections_owner%Its owner
%exyliasurvivalcore_protections_role%Their role in it: owner, a role name, or visitor
%exyliasurvivalcore_protections_subregion%The plot they stand in; blank outside one or with plots off
%exyliasurvivalcore_protections_warp_rating%The average stars of the warp of the protection they stand in, like 4.5
%exyliasurvivalcore_protections_warp_visits%That warp's visits
%exyliasurvivalcore_protections_effects_active%The perks active on them, comma-separated

The lives, raid, bank, upkeep, sale, level and rent placeholders are on the raids and economy pages. All of them are on Placeholders.

Settings

The keys of settings not already covered above:

KeyDefaultWhat it does
settings.backendINTERNALINTERNAL or WORLDGUARD
settings.worldguard-priority10Priority of the regions this module creates
settings.default-limit3Protections a player may own without a limit node
settings.world-limits{}World name to how many a player may own there
settings.min-distance8Blocks between protections of different owners
settings.disabled-worlds[world_the_end]Worlds where land cannot be protected
settings.allowed-world-guard-regions[]WorldGuard regions a protection may overlap
settings.move-price1000What moving a core costs
settings.move-currencyblankBlank is the default currency
settings.home-warmup-seconds3Warmup before teleporting to a home or a warp; moving or taking damage cancels it
settings.deny-message-cooldown-millis1500Milliseconds between two refusal messages

Something missing on this page? Tell us on Discord