public class RegionContainerImpl
extends java.lang.Object
RegionManagers for different worlds or dimensions.
This is an internal class. Do not use it.
| Constructor and Description |
|---|
RegionContainerImpl(RegionDriver driver,
FlagRegistry flagRegistry)
Create a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
RegionManager |
get(java.lang.String name)
Get the region manager for the given world name.
|
RegionDriver |
getDriver()
Get the region store driver.
|
java.util.List<RegionManager> |
getLoaded()
Get an immutable list of loaded region managers.
|
java.util.Set<RegionManager> |
getSaveFailures()
Get the a set of region managers that are failing to save.
|
RegionManager |
load(java.lang.String name)
Load the
RegionManager for the world with the given name,
creating a new instance for the world if one does not exist yet. |
void |
shutdown()
Disable completely.
|
void |
unload(java.lang.String name)
Unload the region manager associated with the given world name.
|
void |
unloadAll()
Unload all region managers and save their contents before returning.
|
public RegionContainerImpl(RegionDriver driver, FlagRegistry flagRegistry)
driver - the region store driverflagRegistry - the flag registrypublic RegionDriver getDriver()
@Nullable public RegionManager load(java.lang.String name)
RegionManager for the world with the given name,
creating a new instance for the world if one does not exist yet.name - the name of the worldnull if loading failedpublic void unload(java.lang.String name)
If no region manager has been loaded for the given name, then nothing will happen.
name - the name of the worldpublic void unloadAll()
public void shutdown()
@Nullable public RegionManager get(java.lang.String name)
name - the name of the worldnull if one was never loadedpublic java.util.List<RegionManager> getLoaded()
public java.util.Set<RegionManager> getSaveFailures()