Got a question that the wiki doesn't answer? Ask on the forum (preferred), or join us on IRC.

BeastNode
About the ads

WorldGuard/Regions/Introduction

From EngineHub.org Wiki
Jump to: navigation, search

Contents

Controlling rank

Inheritance

A region can be assigned a parent, which causes it to:

  • Inherit its owners
  • Inherit its members
  • Inherit its flags, yet override it as well if defined
  • Override the owners and members of its parent so that the owners and members of a child do not need to be in the parent to be able to build
Example: Setting a region's parent
/region setparent child parent

Priorities

However, there are some cases where priorities are needed. Priorities are numbers (negatives are possible) assigned to a region to determine its rank. A higher number is a higher priority, and a higher priority will:

  • Override the owners/members of its parent entirely, not inheriting them
  • Override any flags of lower priorities if the higher priority region has a flag defined
Example: Setting a region's priority
/region setpriority NoBuild 100

Regions of the same rank

There is the obvious problem of when two regions having two rank yet having the same flag set. There are two types of flags:

  • State flags have three states, NONE, ALLOW, and DENY, with precedence in that order (lowest to high). If region A has ALLOW and region B has DENY, then region B's DENY will take precedence.
  • Other flags may conflict. If you set a greeting message in both region A and B, then either may take precedence. To fix that, you have to adjust the region priorities.

Global region

Flags have default values. For example, what if you're in an area where there's no region or no defined region has that flag set? WorldGuard checks the "global region" in that case, and if it's not there, it then checks its built-in value (for example, PvP is enabled by default).

You can change the global region by changing the region named __global__ (two underscores on both sides).

Warning: The global region is NOT "default values" for new regions.
Example: Setting the global region's PvP flag
/region flag __global__ pvp deny


Namespaces

Variants
Actions