public class RegionContainer extends Object
RegionManagers for loaded worlds, which
allows access to the region data of a world. Generally, only data is
loaded for worlds that are loaded in the server.
This class is thread safe and its contents can be accessed from multiple concurrent threads.
An instance of this class can be retrieved using
WorldGuardPlugin.getRegionContainer().
| Modifier and Type | Method and Description |
|---|---|
RegionQuery |
createQuery()
Create a new region query.
|
RegionManager |
get(org.bukkit.World world)
Get the region manager for a world if one exists.
|
RegionDriver |
getDriver()
Get the region store driver.
|
List<RegionManager> |
getLoaded()
Get an immutable list of loaded
RegionManagers. |
Set<RegionManager> |
getSaveFailures()
Get the a set of region managers that are failing to save.
|
void |
migrate(Migration migration)
Execute a migration and block any loading of region data during
the migration.
|
void |
reload()
Reload the region container.
|
public RegionDriver getDriver()
public void reload()
This method may block until the data for all loaded worlds has been unloaded and new data has been loaded.
@Nullable public RegionManager get(org.bukkit.World world)
If you wish to make queries and performance is more important
than accuracy, use createQuery() instead.
This method may return null if region data for the given
world has not been loaded, has failed to load, or support for regions
has been disabled.
world - the worldnull if one is not availablepublic List<RegionManager> getLoaded()
RegionManagers.public Set<RegionManager> getSaveFailures()
public RegionQuery createQuery()
public void migrate(Migration migration) throws MigrationException
migration - the migrationMigrationException - thrown by the migration on errorCopyright © 2015. All Rights Reserved.