Skip to content
Marcel Bartholet edited this page May 25, 2024 · 26 revisions

What are Flags?

Flags are the core of the region protection system. They define which actions are allowed or denied in a region. Flags can be set to

  • Allowed, to allow the corresponding action,
  • Denied, to deny the corresponding action,
  • Disabled, to disable the specific flag for flag checks.

Flags can be set for all kind of regions. The flags are inherited by child regions from their parents. Additionally, it is possible to override the flag state for child regions by setting the override property of the flag of the parent region accordingly.


Flag overview

Currently, there are 80+ flags available. See the Flag command for how to manage flags for regions.

Due to implementation details, the available flags differ slightly between versions. The goal is to achieve consistent behavior of the flags between Forge and Fabric.

Note that not all flags are implemented for both Forge and Fabric. Please refer to the platform specific flag table.


Flag inheritance

Version 0.0.4.0-beta1, introduced flag inheritance. This means that flags are inherited from parent regions to child regions.

  • The same flag set in a child region will take precedence over the same flag of any parent region in flag checks. This means that if a flag is set in the parent region, the child region can override this flag by setting it to a different value. If a flag is not set in the parent region, the child region can set it to a value.

Remember that child regions must have a higher priority than their parent regions.

  • If a flag is set in the parent region, but not set in the child region, the flag will be inherited from the parent region.

  • A parent region can set its flags to override the flags of all child regions. This means that the child regions can't override the flag set in the parent region.

The following table show how flags are handled for region hierarchies. Note that n/a here represents a disabled flag or an undefined flag state:

Parent Child Result
Denied with override Any Denied
Allowed with override Any Allowed
Denied Denied Denied
Denied Allowed Allowed
Allowed Denied Denied
Allowed Allowed Allowed
n/a Denied Denied
n/a Allowed Allowed
Denied n/a Denied
Allowed n/a Allowed

Region flag management

Flags are added and removed by using the add flag and remove flag command for the respecting region type. The new /wp flag <region-type> ... command allows you to further manage and customize the flags.


Flag messages

Flags now have their own dedicated flag message which is shown when the flag is triggered. Further it's now possible to mute flag messages for each individual flag (disabling the alert of the region will still mute all flags for the region).

Flag messages can contain placeholders for:

  • {player} - name of player
  • {flag} - name of triggered flag
  • {region} - name of involved region
  • {dimension} - name of dimension
  • {pos} - position of flag activation source [X=x, Y=y, Z=z]

Flag messages also can be formatted by using the minecraft default string formatting.

  • For example &c{player}&r tried to break a block in &9{region}&r! will result in a red player name and a blue region name.
  • Take a look at this tool for reference as well as the minecraft wiki.

There are default flag messages defined for each player related flag in the resource pack (internationalization) which can be customized.

There are also suggestion flag messages defined for the CLI in the resource pack which can be customized.


Interactive CLI

When managing the flags of regions you will most likely use the flag list command. This command will show you an interactive list of all flags of the region. You can then click on the flag name to get more information about the flag and to change the flag state.

flag-list