public class WauzActiveInstancePool
extends java.lang.Object
WauzActiveInstance
Modifier and Type | Field and Description |
---|---|
private static java.util.HashMap<java.lang.String,WauzActiveInstance> |
storage
A map of cached instance datas by name.
|
Constructor and Description |
---|
WauzActiveInstancePool() |
Modifier and Type | Method and Description |
---|---|
static WauzActiveInstance |
getInstance(org.bukkit.entity.Player player)
Fetches a cached instance data.
|
static WauzActiveInstance |
getInstance(java.lang.String worldName)
Fetches a cached instance data.
|
static WauzActiveInstance |
getInstance(org.bukkit.World world)
Fetches a cached instance data.
|
static void |
registerInstance(WauzActiveInstance instance)
Registers a freshly opened instance.
|
static void |
unregisterInstance(java.lang.String worldName)
Unregisters a deleted instance.
|
private static java.util.HashMap<java.lang.String,WauzActiveInstance> storage
public static WauzActiveInstance getInstance(org.bukkit.entity.Player player)
player
- A player in the instance world.public static WauzActiveInstance getInstance(org.bukkit.World world)
world
- The instance world.public static WauzActiveInstance getInstance(java.lang.String worldName)
worldName
- The name of the instance world.public static void registerInstance(WauzActiveInstance instance)
instance
- The instance to registerpublic static void unregisterInstance(java.lang.String worldName)
worldName
- The world name of the instance to remove.WauzActiveInstance.clearActiveCitizens()