Working with Regions

Region data can be accessed from other plugins using the region data API. A reference to WorldGuard should be available, which is explained in As a Dependency.

Regions and thread safety

The region API is completely thread safe. However, collections (lists, sets, maps) returned from various parts of the region API should generally not be modified. While many of these objects have been made immutable, there is some legacy code remaining.


Region data can be accessed via the RegionContainer. Every region is an instance of ProtectedRegion. If you want to check build permissions, check flags, find overlapping regions, or see what regions contain a point, you must perform a spatial query. Once you’ve gotten a spatial query result, you can calculate flags or check build permissions.