Class RegionContainerImpl
java.lang.Object
com.sk89q.worldguard.protection.managers.RegionContainerImpl
Manages different
RegionManagers for different worlds or dimensions.
This is an internal class. Do not use it.
-
Constructor Summary
ConstructorsConstructorDescriptionRegionContainerImpl(RegionDriver driver, FlagRegistry flagRegistry)Create a new instance. -
Method Summary
Modifier and TypeMethodDescriptionGet the region manager for the given world name.Get the region store driver.Get an immutable list of loaded region managers.Get the a set of region managers that are failing to save.Load theRegionManagerfor the world with the given name, creating a new instance for the world if one does not exist yet.voidshutdown()Disable completely.voidUnload the region manager associated with the given world name.voidUnload all region managers and save their contents before returning.
-
Constructor Details
-
RegionContainerImpl
Create a new instance.- Parameters:
driver- the region store driverflagRegistry- the flag registry
-
-
Method Details
-
getDriver
Get the region store driver.- Returns:
- the driver
-
load
Load theRegionManagerfor the world with the given name, creating a new instance for the world if one does not exist yet.- Parameters:
name- the name of the world- Returns:
- a region manager, or
nullif loading failed
-
unload
Unload the region manager associated with the given world name.If no region manager has been loaded for the given name, then nothing will happen.
- Parameters:
name- the name of the world
-
unloadAll
public void unloadAll()Unload all region managers and save their contents before returning. This message may block for an extended period of time. -
shutdown
public void shutdown()Disable completely. -
get
Get the region manager for the given world name.- Parameters:
name- the name of the world- Returns:
- a region manager, or
nullif one was never loaded
-
getLoaded
Get an immutable list of loaded region managers.- Returns:
- an immutable list
-
getSaveFailures
Get the a set of region managers that are failing to save.- Returns:
- a set of region managers
-