Class ServerPackCreatorPlugin
-
- All Implemented Interfaces:
-
de.griefed.serverpackcreator.api.plugins.BaseInformation
public abstract class ServerPackCreatorPlugin extends Plugin implements BaseInformation
A ServerPackCreator plugin provides additional functionality to ServerPackCreator via any of
de.griefed.serverpackcreator.api.plugins.configurationhandler.ConfigCheckExtension
de.griefed.serverpackcreator.api.plugins.serverpackhandler.PostGenExtension
de.griefed.serverpackcreator.api.plugins.serverpackhandler.PreGenExtension
de.griefed.serverpackcreator.api.plugins.serverpackhandler.PreZipExtension
de.griefed.serverpackcreator.api.plugins.swinggui.ConfigPanelExtension
de.griefed.serverpackcreator.api.plugins.swinggui.TabExtension
and
de.griefed.serverpackcreator.api.plugins.swinggui.ExtensionConfigPanel
de.griefed.serverpackcreator.api.plugins.swinggui.ExtensionTab
For details on
pf4j, the library used to realize the plugin-functionality in ServerPackCreator, visit pf4j.orgGriefed
-
-
Field Summary
Fields Modifier and Type Field Description private final PluginContextcontextprivate final Stringnameprivate final Stringdescriptionprivate final Stringauthorprivate final Stringversionprivate final Stringidprivate final KotlinLoggerpluginsLogprivate final PluginWrapperwrapperprotected final Loggerlog
-
Constructor Summary
Constructors Constructor Description ServerPackCreatorPlugin(PluginContext context)
-
Method Summary
Modifier and Type Method Description final PluginContextgetContext()final StringgetName()Shown in the GUI's plugin list and named in plugins.logwhenever this extension misbehaves.final StringgetDescription()One line telling a user what this does, shown beside name. final StringgetAuthor()Credited in the GUI; free-form, and never used to identify anything. final StringgetVersion()Displayed as-is. final StringgetId()The plugin's id. final KotlinLoggergetPluginsLog()Unitstart()This method is called by the application when the plugin is started. Unitstop()This method is called by the application when the plugin is stopped. -
-
Constructor Detail
-
ServerPackCreatorPlugin
ServerPackCreatorPlugin(PluginContext context)
- Parameters:
context- PluginWrapper provided by ServerPackCreator.
-
-
Method Detail
-
getContext
final PluginContext getContext()
-
getName
final String getName()
Shown in the GUI's plugin list and named in
plugins.logwhenever this extension misbehaves.
-
getDescription
final String getDescription()
One line telling a user what this does, shown beside name.
-
getAuthor
final String getAuthor()
Credited in the GUI; free-form, and never used to identify anything.
-
getVersion
final String getVersion()
Displayed as-is. SPC compares nothing against it, so any scheme works.
-
getId
final String getId()
The plugin's id. Used as the key its configuration is stored under, so it must be stable across releases.
-
getPluginsLog
final KotlinLogger getPluginsLog()
-
start
Unit start()
This method is called by the application when the plugin is started. See PluginManager.startPlugin.
If you intend on overwriting this method, make sure to call
super.start()first.
-
stop
Unit stop()
This method is called by the application when the plugin is stopped. See PluginManager.stopPlugin.
If you intend on overwriting this method, make sure to call
super.start()first.
-
-
-
-