Class PluginExpansion
java.lang.Object
com.olziedev.playerauctions.api.expansion.PluginExpansion
- Direct Known Subclasses:
Expansion
Represents an expansion for it to be loaded and used in
ExpansionRegistry
.-
Field Summary
Modifier and TypeFieldDescriptionThis variable is initialised when the expansion has been loaded and returns the PlayerWarps config instance.This variable is initialised when the expansion has been loaded and returns the PlayerWarps expansion config instance.This variable is initialised when the expansion has been loaded and returns the file of the expansion.boolean
This variable is initialised when the expansion has been loaded and returns if the expansion is integrated into the plugin or if it has been manually registered usingExpansionRegistry.registerExpansion(PluginExpansion)
This variable is initialised when the expansion has been loaded and returns the PlayerWarps plugin instance.This variable is initialised when the expansion has been loaded and returns the registry it was loaded in.This variable is initialised when the expansion has been loaded and returns the version of the expansion. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract String
getName()
abstract boolean
abstract void
onLoad()
This method will be initialised ifisEnabled()
returns true on plugin enable.void
The method that will be initialised before the entire plugin is loaded.void
onUnload()
This method will be initialised when the addon is unloading.void
unload()
This method to unload the expansion from the registry.
-
Field Details
-
plugin
This variable is initialised when the expansion has been loaded and returns the PlayerWarps plugin instance. -
registry
This variable is initialised when the expansion has been loaded and returns the registry it was loaded in. -
expansionConfig
This variable is initialised when the expansion has been loaded and returns the PlayerWarps expansion config instance. -
config
This variable is initialised when the expansion has been loaded and returns the PlayerWarps config instance. -
integrated
public boolean integratedThis variable is initialised when the expansion has been loaded and returns if the expansion is integrated into the plugin or if it has been manually registered usingExpansionRegistry.registerExpansion(PluginExpansion)
-
version
This variable is initialised when the expansion has been loaded and returns the version of the expansion. -
file
This variable is initialised when the expansion has been loaded and returns the file of the expansion. This can return null if the expansion is integrated into the plugin.
-
-
Constructor Details
-
PluginExpansion
public PluginExpansion()
-
-
Method Details
-
isEnabled
public abstract boolean isEnabled()- Returns:
- If the expansion is enabled in the configuration file and is loaded onto the server.
-
getName
- Returns:
- The name of the expansion that will be used in areas of the plugin.
-
onLoad
public abstract void onLoad()This method will be initialised ifisEnabled()
returns true on plugin enable. -
onPreLoad
public void onPreLoad()The method that will be initialised before the entire plugin is loaded. -
unload
public void unload()This method to unload the expansion from the registry. -
onUnload
public void onUnload()This method will be initialised when the addon is unloading.
-