Skip to content

Region Flags

Patrick Miller edited this page Jul 9, 2025 · 3 revisions

skript-worldguard provides full control over WorldGuard's region flags with complete type support.

Note

While skript-worldguard supports all vanilla region flags, it is possible that those added by other plugins may not work.

Getting Region Flags

Getting the value of a flag is simple. The syntax for doing so is:

[the] [region] flag %string% of %worldguardregions%

Note

If a flag is not explicitly set on a region, its default value will be returned instead.

Consider the following expressions:

the flag "greeting" of the regions at the player
the flag "feed-max-hunger" of the regions at the player

image

The returned values will be properly typed. For example, you could perform arithmetic:

set {_region} to the region "my_region" in world "my_world"
set {_number} to the flag "feed-max-hunger" of {_region}
send "The value of the flag 'feed-max-hunger' doubled is %{_number} * 2%"

image

Region Group Flags

WorldGuard also supports specifying the type of players (groups) that a flag applies to (click here to read more).

This feature is supported by modifying the group flag of a flag. The syntax for doing so is:

[the] [region] group flag of [the] flag %string% of %worldguardregions%

The value of a region group flag is always a text/string.

Considering one of our examples from above:

the group flag of the flag "greeting" of the regions at the player

image

In the screenshot above, the group flag for the greeting flag has not been set, so it returns the default value: all (meaning it applies to all players). However, if I use the region flag command to set the value to something else, say owners, we can see this value reflected when evaluating the expression again: image

Changing Region Flags

Setting

Deleting/Resetting

Adding/Removing

Clone this wiki locally