public abstract class TacoConfig
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private org.bukkit.configuration.file.YamlConfiguration |
config |
private java.io.File |
file |
| Constructor and Description |
|---|
TacoConfig(java.io.File file) |
| Modifier and Type | Method and Description |
|---|---|
void |
addDefaultValue(java.lang.String path,
java.lang.Object value)
Adds a default value to the config file if and only if the path does not exist.
|
boolean |
getBoolean(java.lang.String path)
Gets a boolean from the config file.
|
int |
getInt(java.lang.String path)
Gets an int from the config file.
|
java.lang.String |
getString(java.lang.String path)
Gets a string from the config file.
|
void |
save()
Saves the config file.
|
protected abstract void |
setDefaults()
Sets the default values for the config file.
|
private org.bukkit.configuration.file.YamlConfiguration config
private java.io.File file
protected abstract void setDefaults()
public void addDefaultValue(java.lang.String path,
java.lang.Object value)
path - - The path in which the value is setvalue - - The value to setpublic void save()
public java.lang.String getString(java.lang.String path)
path - - The path which the String is taken frompublic int getInt(java.lang.String path)
path - - The path which the int is taken frompublic boolean getBoolean(java.lang.String path)
path - - The path which the boolean is taken from