@Singleton public abstract class ConfigSystem extends java.lang.Object implements SubSystem
Modifier and Type | Field and Description |
---|---|
protected PlanConfig |
config |
protected com.djrapitops.plugin.logging.error.ErrorHandler |
errorHandler |
protected PlanFiles |
files |
protected com.djrapitops.plugin.logging.console.PluginLogger |
logger |
protected Theme |
theme |
Constructor and Description |
---|
ConfigSystem(PlanFiles files,
PlanConfig config,
Theme theme,
com.djrapitops.plugin.logging.console.PluginLogger logger,
com.djrapitops.plugin.logging.error.ErrorHandler errorHandler) |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
copyDefaults()
Copies default values from file in jar to Config.
|
void |
disable()
Performs disable actions for the subsystem
|
void |
enable()
Performs enable actions for the subsystem.
|
PlanConfig |
getConfig() |
Theme |
getTheme() |
void |
reload() |
protected final PlanFiles files
protected final PlanConfig config
protected final Theme theme
protected final com.djrapitops.plugin.logging.console.PluginLogger logger
protected final com.djrapitops.plugin.logging.error.ErrorHandler errorHandler
public ConfigSystem(PlanFiles files, PlanConfig config, Theme theme, com.djrapitops.plugin.logging.console.PluginLogger logger, com.djrapitops.plugin.logging.error.ErrorHandler errorHandler)
public PlanConfig getConfig()
public Theme getTheme()
public void enable() throws EnableException
SubSystem
enable
in interface SubSystem
EnableException
- If an error occurred during enable and it is fatal to the subsystem.protected abstract void copyDefaults() throws java.io.IOException
java.io.IOException
- If file can't be read or written.public void disable()
SubSystem
public void reload()