public class RegionContainerImpl extends Object
RegionManagers for different worlds or dimensions.
This is an internal class. Do not use it.
| Constructor and Description |
|---|
RegionContainerImpl(RegionDriver driver)
Create a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
RegionManager |
get(String name)
Get the region manager for the given world name.
|
RegionDriver |
getDriver()
Get the region store driver.
|
List<RegionManager> |
getLoaded()
Get an immutable list of loaded region managers.
|
Set<RegionManager> |
getSaveFailures()
Get the a set of region managers that are failing to save.
|
RegionManager |
load(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 |
unload(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)
driver - the region store driverpublic RegionDriver getDriver()
@Nullable public RegionManager load(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(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()
@Nullable public RegionManager get(String name)
name - the name of the worldnull if one was never loadedpublic List<RegionManager> getLoaded()
public Set<RegionManager> getSaveFailures()
Copyright © 2015. All Rights Reserved.