public class Config
extends java.lang.Object
get()
.Constructor and Description |
---|
Config(java.io.File file)
Creates a new
Config with the file being the configuration file. |
Modifier and Type | Method and Description |
---|---|
void |
create()
Creates a file for the
FileConfiguration object. |
org.bukkit.configuration.file.FileConfiguration |
get()
Gets the
FileConfiguration object from the Config . |
void |
reload()
Reloads the
FileConfiguration object. |
void |
save()
Saves the
FileConfiguration object. |
public Config(java.io.File file)
Config
with the file being the configuration file.file
- The file to create/loadpublic void create()
FileConfiguration
object. If there are
missing folders, this method will try to create them before create a file
for the config.public org.bukkit.configuration.file.FileConfiguration get()
FileConfiguration
object from the Config
.public void reload()
FileConfiguration
object. If the config object does
not exist it will run create()
first before loading the config.public void save()
FileConfiguration
object.
config.options().copyDefaults(true)
is called before saving the
config.