Class Config
- java.lang.Object
-
- com.djrapitops.plan.settings.config.ConfigNode
-
- com.djrapitops.plan.settings.config.Config
-
- Direct Known Subclasses:
PlanConfig
,ServerFileLoader
,ThemeConfig
public class Config extends ConfigNode
Configuration utility for storing settings in a .yml file.Based on https://github.com/AuroraLS3/Abstract-Plugin-Framework/blob/72e221d3571ef200727713d10d3684c51e9f469d/AbstractPluginFramework/api/src/main/java/com/djrapitops/plugin/config/Config.java
-
-
Field Summary
-
Fields inherited from class com.djrapitops.plan.settings.config.ConfigNode
childNodes, comment, key, nodeOrder, parent, value
-
-
Constructor Summary
Constructors Constructor Description Config(java.io.File configFile)
Config(java.io.File configFile, ConfigNode defaults)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.nio.file.Path
getConfigFilePath()
int
hashCode()
void
read()
void
save()
Find the root node and save.-
Methods inherited from class com.djrapitops.plan.settings.config.ConfigNode
addChild, addNode, contains, copyAll, copyMissing, getBoolean, getBoolean, getChildren, getComment, getInteger, getInteger, getKey, getLong, getLong, getNode, getNodeDepth, getNodeOrder, getParent, getString, getString, getStringList, getStringList, getStringMap, isLeafNode, moveChild, remove, removeChild, removeNode, reorder, set, set, setComment, sort, toString, updateParent
-
-
-
-
Constructor Detail
-
Config
public Config(java.io.File configFile)
-
Config
public Config(java.io.File configFile, ConfigNode defaults)
-
-
Method Detail
-
read
public void read() throws java.io.IOException
- Throws:
java.io.IOException
-
save
public void save() throws java.io.IOException
Description copied from class:ConfigNode
Find the root node and save.- Overrides:
save
in classConfigNode
- Throws:
java.io.IOException
- If the save can not be performed.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classConfigNode
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classConfigNode
-
getConfigFilePath
public java.nio.file.Path getConfigFilePath()
-
-