|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectme.jacklin213.lincore.LocalConfigHandler
public class LocalConfigHandler
LocalConfigHandler is a class which handles basic configuration. If addition methods need to be added make a local class which extends to this class.
| Field Summary | |
|---|---|
static LinCore |
LinCore
|
| Constructor Summary | |
|---|---|
LocalConfigHandler(Plugin instance,
Logger logger,
DataStorage dataStorage)
LocalConfigHandler constructor for LinPlugin series. |
|
| Method Summary | |
|---|---|
void |
assignVariableStrings()
Assigns the Strings to their specified variables in the DataStorage class |
void |
createConfig()
Creates a config which is copied from the default config.yml, will cause and NPE if there is no default config |
FileConfiguration |
getConfig()
Gets the config |
Logger |
getConfigLogger()
Returns the plugin logger. |
String |
getPluginFolder()
Gets the absolute path of the plugin datafolder. |
void |
reloadConfig()
Reloads the config and logs message to console |
void |
setConfig()
Sets the config from the plugin class. |
void |
setConfigLogger()
Sets the logger form the plugin class. |
void |
setDataStorageClass(DataStorage instance)
Sets the instance of the DataStorage class for the ConfigHandler class. |
void |
setPluginDescriptionFile()
Sets the PluginDesciptionFile. |
void |
setPluginFolder()
Sets the pluginFolder. |
void |
setup()
Sets up the ConfigHandler for specified LinPlugin from the LocalConfigHandler constructor
Runs the register, setPluginFolder, setConfigLogger, createConfig methods. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static LinCore LinCore
| Constructor Detail |
|---|
public LocalConfigHandler(Plugin instance,
Logger logger,
DataStorage dataStorage)
setup method
instance - The LinPlugin to be hooked to.logger - Plugin logger (getLogger() from main class)dataStorage - DataStorage instance to set and retrieve data from| Method Detail |
|---|
public void createConfig()
public void reloadConfig()
public void setup()
LocalConfigHandler constructor
Runs the register, setPluginFolder, setConfigLogger, createConfig methods.
public FileConfiguration getConfig()
public Logger getConfigLogger()
public String getPluginFolder()
public void setConfig()
public void setConfigLogger()
public void setDataStorageClass(DataStorage instance)
instance - DataStorage instance (Should be declared in main class)public void setPluginDescriptionFile()
public void setPluginFolder()
public void assignVariableStrings()
DataStorage class
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||