Global Region

The global region is a special region that:

  • Encompasses the entire world
  • Has the lowest possible priority
  • Has some special behavior

Every world has its own global region. However, the global region does not exist until you attempt to modify it by referring to the global region with the name __global__.

For example, setting a flag on the global region would create the region automatically:

/rg flag __global__ pvp deny

Properties

Think of the global region as a region that is always there. Flags set on the global region, aside from a few flags, work like they would on any other region.

However, unlike normal regions, the passthrough region flag is implicitly set to allow. If you recall, setting passthrough to allow makes the region a non-protection region, so players can build in the region as long as there are not other regions preventing it.

Changing passthrough

If you change the passthrough flag to deny, making the global region act like a regular region, players must be owners or members of the global region in order to build in it. Because the global reason encompasses the entire world, that means building is denied by default.

Because the global region is considered the lowest priority region, any other normal regions made will override the global region and thus allow building if a player is a member of that region.

Note

The passthrough flag has nothing to do with movement. It means “passthrough of build permissions,” as better explained in Region Flags.

Example: Preventing building in the “wilderness”

The passthrough flag can be set to deny:

/rg flag __global__ passthrough deny

Adding Members

Due to legacy reasons, adding owners or members to the global region implicitly sets passthrough to deny. That means that you do not have to actually change the flag, although it is recommended anyway.

Build Flag

The build flag cannot be set to allow as there should be no reason to and it essentially breaks all regions by default. Setting the flag to deny works like it does with any other region, but be aware that setting build to deny on any region essentially means that nothing can break or place blocks, therefore breaking things like pistons. Since the global region encompasses the entire world, it would break all pistons.

Warning

Setting the build flag on the global region is strongly discouraged. If you want to protect the world by default, set the passthrough flag. If you set the build flag on the global region, other regions will not override the flag unless the other region also has build set to something.

Thus, setting build to deny on the global region prevents people from building at all in regions that they own or are a member of.

Overriding Defaults

Flags in WorldGuard come with certain defaults. For example, the exp-drop flag defaults to allow if no regions set it, which means that experience drops are permitted even when a player is not a member or owner of the region.

If you want to override the exp-drops flag by setting it to deny and having it apply to only non-members, setting it on the global region would not work. For example, you may be tempted to use /rg flag __global__ exp-drop -g nonmembers deny, but this will not work. When you specify non-members, it refers to non-members of the global region. Thus, if you make, for example, a plot region, XP drops would be denied for the plot’s members because the plot’s members are not members of the global region. (Remember, the global region is of a low priority. However, regions do not inherit from it so flags do not propagate.)

In these cases, it is recommend that you create a “template region” as explained in the priorities and inheritance page.