HyperScript
Docs

← All of the Docs HyperGuard

Claiming land HyperGuard

expressionclaim guard region <name> from <location> to <location>HyperGuard

Make a region and make the player its owner, if the name is free, the box touches no other region and the player is under their limit. full height as above; for <who> to claim for someone else who is online

claim guard region "land_%player.name%" from {_low} to {_high} full height
expressionguard claim resultHyperGuard

What the last claim came to: claimed, name taken, overlaps, limit reached, or failed when the corners or the player were no good

if guard claim result is "claimed":
    send "&aThis land is yours now."
expressionguard regions owned by <who>HyperGuard

A list of the regions a player owns, in every world

send "&7You own: &f" + join guard regions owned by player with ", "
Guide and examples

One line that does what a plot script otherwise checks by hand: is the name free, does the land touch anyone else's, and does the player already own as much as they may?

command /claimland:
    players only: true
    trigger:
        set {_low} to player's location offset by -8, 0, -8
        set {_high} to player's location offset by 8, 0, 8
        claim guard region "land_%player.name%" from {_low} to {_high} full height
        if guard claim result is "claimed":
            send "&aThis land is yours now."
        else if guard claim result is "overlaps":
            send "&cThat would touch someone else's land."
        else if guard claim result is "limit reached":
            send "&cYou already own as much land as you may."
        else:
            send "&cYou have claimed land here before."

command /myland:
    players only: true
    trigger:
        send "&7You own: &f" + join guard regions owned by player with ", "
SyntaxEffect
claim guard region <name> from <location> to <location>Make a region and make the player its owner, if the name is free, the box touches no other region and the player is under their limit. full height as above; for <who> to claim for someone else who is online
guard claim resultWhat the last claim came to: claimed, name taken, overlaps, limit reached, or failed when the corners or the player were no good
guard regions owned by <who>A list of the regions a player owns, in every world
  • The limit is claim-limit in plugins/HyperGuard/config.yml, 3 unless changed; -1 is no limit. Players with the permission hyperguard.claim.unlimited are never held back.
  • Every region a player owns counts towards the limit, however it was made.