public class OneBlockProgression
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private int |
blockNo
The one-block current block number of the player.
|
private int |
highestPhase
The highest reached one-block phase of the player.
|
private OnePhaseLevel |
level
The one-block level of the player.
|
private int |
levelNo
The one-block level number of the player.
|
private OnePhase |
phase
The one-block phase of the player.
|
private int |
phaseNo
The one-block phase number of the player.
|
private org.bukkit.entity.Player |
player
The player that owns the one block.
|
private static java.util.HashMap<org.bukkit.entity.Player,OneBlockProgression> |
storage
A map of cached one-block progressions by player.
|
private int |
totalBlocks
The one-block total blocks destroyed of the player.
|
Modifier | Constructor and Description |
---|---|
private |
OneBlockProgression(org.bukkit.entity.Player player)
Creates a new one-block progression instance for the given player.
|
Modifier and Type | Method and Description |
---|---|
int |
getBlockNo() |
OnePhaseLevel |
getLevel() |
OnePhase |
getPhase() |
static OneBlockProgression |
getPlayerOneBlock(org.bukkit.entity.Player player)
Fetches a cached one-block progressions.
|
int |
getTotalBlocks() |
void |
load(org.bukkit.configuration.file.FileConfiguration playerDataConfig)
Loads all progression values.
|
void |
progress(org.bukkit.block.Block blockToBreak)
Lets the player break the given one block and progress to the next one.
|
private static OneBlockProgression |
regPlayerOneBlock(org.bukkit.entity.Player player)
Registers a player, by creating a new one-block progressions.
|
void |
save(org.bukkit.configuration.file.FileConfiguration playerDataConfig)
Saves all progression values.
|
private static java.util.HashMap<org.bukkit.entity.Player,OneBlockProgression> storage
private org.bukkit.entity.Player player
private int phaseNo
private int levelNo
private int blockNo
private OnePhase phase
private OnePhaseLevel level
private int highestPhase
private int totalBlocks
private OneBlockProgression(org.bukkit.entity.Player player)
player
- The player that owns the one block.public static OneBlockProgression getPlayerOneBlock(org.bukkit.entity.Player player)
player
- The player that owns the one block.private static OneBlockProgression regPlayerOneBlock(org.bukkit.entity.Player player)
player
- The player that owns the one block.public void load(org.bukkit.configuration.file.FileConfiguration playerDataConfig)
playerDataConfig
- The player's save file.public void save(org.bukkit.configuration.file.FileConfiguration playerDataConfig)
playerDataConfig
- The player's save file.public void progress(org.bukkit.block.Block blockToBreak)
blockToBreak
- The one block.public OnePhase getPhase()
public OnePhaseLevel getLevel()
public int getBlockNo()
public int getTotalBlocks()