Migration
What to redo by hand when moving from the protections module of ExyliaSurvivalCore, and importing ProtectionStones regions.
Bring land from ProtectionStones into ExyliaProtections with one command, or move over from the old protections module of ExyliaSurvivalCore.
From ExyliaSurvivalCore#
Protections used to be a module of ExyliaSurvivalCore. They are now this plugin, with the same keys,
stored in its own protections* tables. The survival core keeps running beside it: its statistics and
player settings still apply to protections, read through ExyliaLib.
Releases up to 1.0.1 copied the survival core's database.yml, protection settings, messages and every
sc_protection* table on the first start, and declared the old exyliasurvivalcore.protections*
permissions. Since 1.0.2 none of that exists: ExyliaProtections reads only its own files and tables, and no
longer warns when an older ExyliaSurvivalCore still runs its protections module. A server whose
protections are still only in the sc_protection* tables starts with none.
What to redo by hand when moving over:
- The module. Update ExyliaSurvivalCore to a release without the protections module, or turn the module off, so only one plugin guards land.
- Settings and messages. The keys are the same: copy the values you changed from
modules/protections/config.ymlintoplugins/ExyliaProtections/config.yml. The menus were redesigned and are not compatible; see Menus. - Permissions. Grant the new names:
exyliaprotections.use,.select,.admin,.bypassand.limit.<n>. The oldexyliasurvivalcore.protections*nodes, the limit prefix included, do nothing. See Permissions. - Placeholders. Inside Exylia plugins' own files the names are the same,
%protections_count%. Through PlaceholderAPI the plugin in front changes:%exyliasurvivalcore_protections_count%becomes%exyliaprotections_protections_count%. See Placeholders. - Commands.
/protections,/psand/claimskeep their names. Staff commands moved to/protectionsadmin; see Administration. - The API. Plugins read protections through ExyliaLib's
ProtectionsService. See API.
The regions this plugin mirrors keep the sc_ps_ prefix the survival core used. With WorldGuard installed,
every start makes WorldGuard hold exactly the regions the backend wants: none on INTERNAL, one per
protection in the database on WORLDGUARD. Any sc_ps_ region left by the survival core with no
protection behind it is removed either way. See
Backends.
From ProtectionStones#
Check what you need
WorldGuard must be enabled, and you need exyliaprotections.admin. ProtectionStones itself may already be removed. Add your ProtectionStones blocks to import.tier-map in config.yml if they are not the same blocks as your tiers.
Preview it
Run /protectionsadmin import protectionstones --dry-run from the console or in game. It changes nothing and reports how many regions would be imported, overlap or be skipped, with the first ten problems.
Import
Run /protectionsadmin import protectionstones. Run it again later: what is already imported is skipped.
Remove the old command
ProtectionStones also registers /ps. Remove it once the import is done, so /ps reaches ExyliaProtections.
The import needs WorldGuard enabled; ProtectionStones itself may already be removed, because WorldGuard
keeps the regions and their flags. Run it with --dry-run first: that reports what would happen and
changes nothing. It is a command only, with exyliaprotections.admin, from the console or in game.
It walks every loaded world of the server it runs on and takes each region named ps<x>x<y>y<z>z. The
core is the block that name points at, and the region's box becomes the land.
Keys and defaults
| Region | Becomes |
|---|---|
ps-block-material | The tier: import.tier-map first — the block as written, like PLAYER_HEAD:Notch, then without the suffix — then the tier placed with the same block, then import.default-tier |
| First owner | The owner |
| Other owners | Members with import.owner-role |
| Members | Members with import.member-role |
ps-name | The name, as plain text up to 32 characters; without one, the default name |
ps-home | The home; without one, on top of the core |
pvp, mob-spawning, fire-spread, crop-growth, leaf-decay, mob-damage, fall-damage, item-drop, item-pickup | The flag of the same name |
tnt, creeper-explosion, other-explosion | explosions |
water-flow, lava-flow | liquid-flow |
entry | visitor-entry |
natural-hunger-drain | hunger |
enderman-grief, ravager-grief, enderdragon-block-damage | mob-griefing |
grass-growth, mycelium-spread, vine-growth, mushroom-growth | block-spread |
snow-fall, snow-melt, ice-form, ice-melt | snow-ice |
block-trampling | crop-trample |
enderpearl, chorus-fruit-teleport | ender-pearl |
A flag the region never set keeps the tier's default. When several WorldGuard flags feed one flag, any of
them denying turns it off. A role the protection does not have falls back to its first role other than
visitor, and with no such role the players are left out.
Keys and defaults
| Key | Default | What it does |
|---|---|---|
import.tier-map | {} | ProtectionStones block to tier id |
import.default-tier | small | The tier for blocks nothing matches; blank skips those regions |
import.owner-role | trusted | The role owners other than the first get |
import.member-role | member | The role members get |
import.remove-source-regions | false | Whether each imported region is removed from WorldGuard |
A region is left out, and listed with the reason, when it is not a cuboid (merged ProtectionStones regions are polygons), has no owner, has no tier, or overlaps a protection of this server or one the same run already took. The answer counts imported, already imported, overlapping and skipped, and lists the first ten problems.
An imported protection's id comes from its server, world and region, so running the import again skips what it already brought over. Limits are not checked, and each protection belongs to the server that ran the import.
With import.remove-source-regions off, the default, the ProtectionStones regions stay in WorldGuard and
keep enforcing their old owners and members beside the new protection: a member added later in
ExyliaProtections can still be refused by WorldGuard there. They also count as foreign regions, so
upgrading an imported protection, growing it with a new core, or moving it over its old region is refused with the
WorldGuard overlap message until the region is removed or listed in settings.allowed-world-guard-regions.
Turn the key on to remove each region as it is imported; a dry run warns when it is on.
Check that it works#
Run /protections as the owner of an imported region: the protection is in My protections, with its old name, home and flags. Standing in it, /ps show draws its border (after you removed ProtectionStones' own /ps).
Something missing on this page? Tell us on Discord