DUXPLIMA Documentation

Importing WorldGuard

Move WorldGuard regions over with a dry run first, an undo after, and a report of everything not converted.

Contents: The three steps · What is converted · Membership becomes rules · Flags to rules · Flags to behaviours · Afterwards

The three steps

Keep WorldGuard installed while you import; guard reads its files, not the running plugin.

/guard import worldguard dry-run
/guard import worldguard run
/guard import worldguard undo
  1. dry-run reads everything, converts it in memory, writes plugins/uxmEssentials/guard/import-report.txt and changes nothing. Read the report: it lists every flag, player name or region that could not be converted.
  2. run takes a backup, stores the converted regions and tags them with an import batch. A region whose name already exists in guard is skipped and counted, never overwritten.
  3. undo removes every region of the last batch. Since a run never overwrites, this returns guard to how it was before the run.

By default the regions come from plugins/WorldGuard/worlds/<world>/regions.yml, for every world folder there. sql as the last word (/guard import worldguard run sql) reads WorldGuard's database instead, with the regions.sql settings in WorldGuard's own config.yml.

What is converted

WorldGuardGuard
Region nameThe same name in lower case; characters other than letters, digits, _ and - become -
__global__A global region named wg-global with priority -100000, under every other region
Cuboid, polygonThe same shape
Priority, parentThe same
Owners, members (by UUID)The owner and member roles
Owners, members (by name)Looked up among players the server has seen; a name never seen goes to the report
Owner and member groupsperm:group.<name> rules wherever the region's members are allowed
<flag>-groupThe target of that flag's rules: members, owners, non_members, non_owners, all or none

Membership becomes rules

In WorldGuard a region without a build flag lets only its members build. A guard region without rules does nothing, so the importer writes that default out as rules: everyone is denied the build family, and owners, members and member groups are allowed it. The build family is break, place, use, interact, damage.animal, damage.villager, damage.armor-stand, damage.hanging, damage.vehicle, vehicle.place, vehicle.destroy, hanging.place, hanging.break, item.use.bucket, item.use.lighter, item.use.bone-meal, item.use.spawn-egg and trample. A region with passthrough: allow or a build flag of its own skips this. The global region skips it too, unless it has passthrough: deny, the usual WorldGuard way to protect a whole world: then only its members build anywhere no other region decides.

A flag the region sets itself beats this default, as in WorldGuard: use: allow lets everyone use, and block-break: deny stops members as well.

Flags to rules

A state flag becomes one rule for each action below, allow or deny as the flag was, for the flag's group (all unless the region sets <flag>-group; entry and exit default to non-members, as in WorldGuard).

WorldGuard flagGuard actions
buildthe build family (see above)
block-breakbreak
block-placeplace
useuse
interactuse, interact
damage-animalsdamage.animal
pvpdamage.player
sleepuse.bed
respawn-anchorsuse.respawn-anchor
tntworld.explosion.tnt
chest-accessuse.container
vehicle-placevehicle.place
vehicle-destroyvehicle.destroy
lighteritem.use.lighter
rideinteract.vehicle
potion-splashitem.use.potion
item-frame-rotationinteract.item-frame
block-tramplingtrample
use-anviluse.workstation
use-dripleaftrample.dripleaf
wind-charge-burst, breeze-charge-explosionworld.explosion.breeze
item-pickupitem.pickup
item-dropitem.drop
creeper-explosionworld.explosion.creeper
ghast-fireballworld.explosion.ghast
other-explosionworld.explosion.other, world.explosion.bed, world.explosion.crystal
wither-damageworld.explosion.wither, world.mob.wither
enderman-griefworld.mob.enderman
snowman-trailsworld.mob.snow-golem
ravager-griefworld.mob.ravager
enderdragon-block-damage, entity-item-frame-destroy, entity-painting-destroyworld.mob.other
pistonsworld.piston
fire-spreadworld.fire.spread
lava-fireworld.fire.lava
lightningworld.lightning, world.fire.lightning
snow-fall, ice-form, frosted-ice-form, lava-hardenworld.form
snow-melt, ice-melt, frosted-ice-meltworld.melt
mushroom-growth, grass-growth, mycelium-spreadworld.spread
leaf-decayworld.decay
vine-growthworld.grow.vine
rock-growthworld.grow.amethyst
sculk-growthworld.grow.sculk
crop-growthworld.grow.crop
soil-dry, coral-fade, copper-fade, moisture-changeworld.fade
water-flowworld.liquid.water
lava-flowworld.liquid.lava
entrymove.enter
exitmove.exit
enderpearlitem.use.ender-pearl
chorus-fruit-teleportitem.use.chorus-fruit

Flags to behaviours

WorldGuard flagGuard behaviour
greeting, farewellmessage.enter, message.exit on the chat channel
greeting-title, farewell-titlemessage.enter, message.exit on the title channel
entry-deny-message, exit-deny-messageenter.deny-message, exit.deny-message
deny-message set to emptydeny-messages = false
game-modegame-mode
invincibleinvincible
time-lock, weather-locktime, weather
blocked-cmds, allowed-cmdscommands.deny, commands.allow
heal-amount with heal-delay, feed-amount with feed-delayheal, feed
mob-spawning: denyspawn.deny = *
deny-spawnspawn.deny with those mob types
fall-damage, firework-damage, natural-hunger-drain, exp-dropsfall-damage, firework-damage, hunger, exp-drops

Colour codes in WorldGuard messages (&a) are turned into MiniMessage.

Afterwards

While both plugins are installed, both protect: a player must pass WorldGuard and guard. Check the imported regions in game (/guard info, /guard test, a walk through them), then remove WorldGuard and restart. The uxmEssentials features that read WorldGuard (menu conditions, respect-worldguard in poses) simply stop finding it.

A flag the report lists as not converted has no meaning in guard, or was registered in WorldGuard by another plugin. uxmEssentials' own set-pwarp flag is one of these: nothing ever checked it, so nothing changes when it is gone.