public abstract class Module<E> extends EventKey
| Modifier and Type | Field and Description |
|---|---|
private ModuleClassLoader |
classLoader |
private File |
configFile
The configuration file of this module.
|
private Configuration |
configuration
The configuration for this module.
|
private File |
dataFolder
The folder where the data of this module is saved in.
|
private ModuleConfig |
moduleConfig
The configuration of this module's file.
|
private ModuleLoader |
moduleLoader
The loader that was used to load this module.
|
private File |
utilFile
The utility file of this module.
|
| Constructor and Description |
|---|
Module() |
| Modifier and Type | Method and Description |
|---|---|
Module<E> |
createUtils(Document document)
Creates a new utility file holding the information in the given document.
|
boolean |
equals(Object o) |
String |
getAuthor()
Returns the author of this module.
|
ModuleClassLoader |
getClassLoader() |
abstract E |
getCloud()
Returns the domain of this module.
|
Configuration |
getConfig()
Returns the currently loaded configuration; loads it,
if it isn't loaded already.
|
File |
getConfigFile() |
Configuration |
getConfiguration() |
File |
getDataFolder()
Returns the directory where the data of this module is stored.
|
ModuleConfig |
getModuleConfig() |
ModuleLoader |
getModuleLoader() |
String |
getName()
Returns the name of the module, if a module configuration is present.
|
String |
getPluginName()
Returns the name of this module.
|
File |
getUtilFile() |
Document |
getUtils()
Loads and returns the document containing utility information.
|
String |
getVersion()
Returns the version of this module.
|
int |
hashCode() |
Module<E> |
loadConfig()
Load this module's configuration
|
private void |
loadConfiguration() |
void |
onBootstrap()
Method that is called when the module is enabled.
|
void |
onLoad()
Method that is called when the module is loaded.
|
void |
onShutdown()
Method that is called when the plugin is about to be shut down.
|
Module<E> |
saveConfig()
Save the configuration of this module.
|
Module<E> |
saveUtils(Document document)
Save the utility information.
|
void |
setClassLoader(ModuleClassLoader classLoader) |
void |
setConfigFile(File configFile) |
void |
setConfiguration(Configuration configuration) |
void |
setDataFolder(File dataFolder) |
void |
setModuleConfig(ModuleConfig moduleConfig) |
void |
setModuleLoader(ModuleLoader moduleLoader) |
void |
setUtilFile(File utilFile) |
String |
toString() |
private File dataFolder
private File configFile
private File utilFile
private ModuleConfig moduleConfig
private ModuleClassLoader classLoader
private Configuration configuration
private ModuleLoader moduleLoader
public void onLoad()
public void onBootstrap()
public void onShutdown()
public String getName()
some_plugin- + a random long value otherwise.public String getPluginName()
public String getVersion()
public String getAuthor()
public Module<E> createUtils(Document document)
document - the document that holds the utility informationpublic Document getUtils()
public Module<E> saveUtils(Document document)
document - the document containing the utility informationpublic Configuration getConfig()
private void loadConfiguration()
public File getDataFolder()
public void setDataFolder(File dataFolder)
public Configuration getConfiguration()
public void setConfiguration(Configuration configuration)
public File getConfigFile()
public void setConfigFile(File configFile)
public File getUtilFile()
public void setUtilFile(File utilFile)
public ModuleClassLoader getClassLoader()
public void setClassLoader(ModuleClassLoader classLoader)
public ModuleConfig getModuleConfig()
public void setModuleConfig(ModuleConfig moduleConfig)
public ModuleLoader getModuleLoader()
public void setModuleLoader(ModuleLoader moduleLoader)
public abstract E getCloud()
Copyright © 2020. All rights reserved.