effectcreate guard region <name> from <location> to <location>HyperGuardexample
Make a box-shaped region between two corners. With a name that exists, the region is replaced
create guard region arg.1 from {%player%.a} to {%player%.b}
effectcreate guard region <name> from <location> to <location> full heightHyperGuardexample
The same, from the bottom of the world to the top
create guard region {_name} from {_low} to {_high} full height
effectdelete guard region <name>HyperGuardexample
Remove a region
delete guard region "plot_%player.name%"
expressionguard regions between <location> and <location>HyperGuardexample
A list of the regions that touch the box between two corners; add full height as above
if size of guard regions between {_low} and {_high} full height > 0:
send "&cThat would overlap someone else's land."
stop
expressionguard allows building at <location>HyperGuardexample
Whether WorldGuard lets the player build there, with owners, members, flags and bypass all considered
if guard allows building at player's location for arg.1:
send "&a%arg.1% may build where you stand."
expressionguard allows building at <location> for <who>HyperGuardexample
The same for another player who is online
if guard allows building at player's location for arg.1:
send "&a%arg.1% may build where you stand."
expressionpriority of guard region <name>HyperGuardexample
The region's priority; settable with set priority of guard region <name> to <n>
set priority of guard region arg.1 to 10
expressionparent of guard region <name>HyperGuardexample
The region it inherits from; set parent of guard region <name> to <name>, or clear parent of guard region <name>
set parent of guard region arg.1 to "city"
Guide and examples
command /claim:
players only: true
trigger:
set {_name} to "plot_%player.name%"
set {_low} to player's location offset by -8, 0, -8
set {_high} to player's location offset by 8, 0, 8
if size of guard regions between {_low} and {_high} full height > 0:
send "&cThat would overlap someone else's land."
stop
create guard region {_name} from {_low} to {_high} full height
add player to guard region {_name} as owner
send "&aThis land is yours now."
command /unclaim:
players only: true
trigger:
delete guard region "plot_%player.name%"
send "&eYour land is free again."
on block break:
unless guard allows building at event's location:
send action bar "&cThis land belongs to someone else" to player
command /canbuild <target:player>:
permission: "plots.manage"
players only: true
trigger:
if guard allows building at player's location for arg.1:
send "&a%arg.1% may build where you stand."
else:
send "&c%arg.1% may not build where you stand."
command /plotsetup <plot>:
permission: "plots.manage"
trigger:
set priority of guard region arg.1 to 10
set parent of guard region arg.1 to "city"
send "&7Priority: &f" + priority of guard region arg.1
send "&7Parent: &f" + parent of guard region arg.1
Syntax
Effect
create guard region <name> from <location> to <location>
Make a box-shaped region between two corners. With a name that exists, the region is replaced
create guard region <name> from <location> to <location> full height
The same, from the bottom of the world to the top
delete guard region <name>
Remove a region
guard regions between <location> and <location>
A list of the regions that touch the box between two corners; add full height as above
guard allows building at <location>
Whether WorldGuard lets the player build there, with owners, members, flags and bypass all considered
guard allows building at <location> for <who>
The same for another player who is online
priority of guard region <name>
The region's priority; settable with set priority of guard region <name> to <n>
parent of guard region <name>
The region it inherits from; set parent of guard region <name> to <name>, or clear parent of guard region <name>
Both corners must be in the same world. The region is made in that world.
A new region has no owners, members or flags. Add the owner right after making it.
guard allows building at is the question to ask before a script places or breaks a block for a player; WorldGuard itself already stops the player's own building.