public class WauzActiveInstance extends WauzBaseInstance
Modifier and Type | Field and Description |
---|---|
private java.util.List<WauzCitizen> |
activeCitizens
The citizens that have been spawned in the instance.
|
private java.util.Map<java.lang.String,WauzInstanceKeyStatus> |
keyStatusMap
A map of the statuses of the instance's keys, indexed by key id.
|
private java.util.Map<org.bukkit.entity.Player,java.lang.Integer> |
playerDeathMap
A map of the amount of times a player has died in the instance so far, indexed by player.
|
private org.bukkit.Location |
spawnLocation
The location to spawn players.
|
private org.bukkit.World |
world
The world of the instance.
|
Constructor and Description |
---|
WauzActiveInstance(org.bukkit.World world,
java.lang.String name) |
WauzActiveInstance(org.bukkit.World world,
WauzInstance template)
Constructs an active instance data, based on an instance template.
|
Modifier and Type | Method and Description |
---|---|
void |
addPlayerDeath(org.bukkit.entity.Player player)
Increases the amount of times a player has died in the instance by one.
|
void |
clearActiveCitizens()
Removes all citizens that have been spawned in the instance.
|
WauzInstanceKeyStatus |
getKeyStatus(java.lang.String keyId) |
int |
getPlayerDeaths(org.bukkit.entity.Player player) |
org.bukkit.Location |
getSpawnLocation() |
org.bukkit.World |
getWorld() |
void |
setKeyStatus(java.lang.String keyId,
WauzInstanceKeyStatus status)
Updates the status of a key.
|
getDisplaySubtitle, getDisplayTitle, getInstanceName, getKeyIds, getMaxDeaths, getMaxPlayers, getMobArena, getSoundtrackName, getSpawnCoords, getType, setDisplaySubtitle, setDisplayTitle, setInstanceName, setKeyIds, setMaxDeaths, setMaxPlayers, setMobArena, setSoundtrackName, setSpawnCoords, setType
private org.bukkit.World world
private org.bukkit.Location spawnLocation
private java.util.List<WauzCitizen> activeCitizens
private java.util.Map<org.bukkit.entity.Player,java.lang.Integer> playerDeathMap
private java.util.Map<java.lang.String,WauzInstanceKeyStatus> keyStatusMap
public WauzActiveInstance(org.bukkit.World world, java.lang.String name)
public WauzActiveInstance(org.bukkit.World world, WauzInstance template)
world
- The world of the instance.template
- The template, the instance was created from.MobSpawn.spawn(World)
,
WauzInstanceCitizen.spawn(World)
public org.bukkit.World getWorld()
public org.bukkit.Location getSpawnLocation()
public void clearActiveCitizens()
public int getPlayerDeaths(org.bukkit.entity.Player player)
player
- The player to get the death count for.public void addPlayerDeath(org.bukkit.entity.Player player)
player
- The player to increase the deaths for.public WauzInstanceKeyStatus getKeyStatus(java.lang.String keyId)
keyId
- The id of the key to get the status for.public void setKeyStatus(java.lang.String keyId, WauzInstanceKeyStatus status)
keyId
- The id of the key to update the status for.status
- The new key status.