public class Miner
extends java.lang.Object
| Constructor and Description |
|---|
Miner(java.lang.String playerName)
Creates a player with a blank configuration and the given player name
|
| Modifier and Type | Method and Description |
|---|---|
org.bukkit.configuration.Configuration |
getConfiguration()
Gets the base configuration that the data is stored in.
|
org.bukkit.configuration.ConfigurationSection |
getConfigurationSection(java.lang.String path)
Gets a configuration section from this miner's conf, or creates it if it doesnt exist.
|
java.lang.String |
getPlayerName()
Gets the name of the player this represents.
|
java.lang.Object |
getValue(java.lang.String path)
Helper method.
|
static Miner |
loadMinerFromYamlFile(java.lang.String name,
java.io.File f)
Loads player data from the given yaml file and returns a new Miner
|
void |
saveMinerToYamlFile(java.io.File f)
Saves all the player data to a yaml file at the given location.
|
void |
setValue(java.lang.String path,
java.lang.Object value)
Helper method.
|
public Miner(java.lang.String playerName)
playerName - The Name of the player.public java.lang.String getPlayerName()
public org.bukkit.configuration.ConfigurationSection getConfigurationSection(java.lang.String path)
path - The path to the sectionpublic java.lang.Object getValue(java.lang.String path)
path - The path to the value.public void setValue(java.lang.String path,
java.lang.Object value)
path - Path to the valuevalue - The value to set.public org.bukkit.configuration.Configuration getConfiguration()
public void saveMinerToYamlFile(java.io.File f)
throws java.io.FileNotFoundException,
java.io.IOException,
org.bukkit.configuration.InvalidConfigurationException
f - File to save to.java.io.FileNotFoundExceptionjava.io.IOExceptionorg.bukkit.configuration.InvalidConfigurationExceptionpublic static Miner loadMinerFromYamlFile(java.lang.String name, java.io.File f) throws java.io.IOException, org.bukkit.configuration.InvalidConfigurationException
name - Name of the playerf - File to load fromjava.io.IOExceptionorg.bukkit.configuration.InvalidConfigurationException