Package emu.grasscutter.plugin
Class Plugin
java.lang.Object
emu.grasscutter.plugin.Plugin
The base class for all plugins to extend.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal FileReturns a directory where plugins can store data files.final StringGet the plugin's description.final ServerHookReturns the server hook.final PluginIdentifierThe plugin's identifier instance.final StringgetName()Get the plugin's name.final InputStreamgetResource(String resourceName) Returns an input stream for a resource in the JAR file.final GameServerReturns the server that initialized the plugin.final StringGet the plugin's version.voidvoidonEnable()voidonLoad()
-
Constructor Details
-
Plugin
public Plugin()
-
-
Method Details
-
getIdentifier
The plugin's identifier instance.- Returns:
- An instance of
PluginIdentifier.
-
getName
Get the plugin's name. -
getDescription
Get the plugin's description. -
getVersion
Get the plugin's version. -
getServer
Returns the server that initialized the plugin.- Returns:
- A server instance.
-
getResource
Returns an input stream for a resource in the JAR file.- Parameters:
resourceName- The name of the resource.- Returns:
- An input stream.
-
getDataFolder
Returns a directory where plugins can store data files.- Returns:
- A directory on the file system.
-
getHandle
Returns the server hook.- Returns:
- A server hook singleton.
-
onLoad
public void onLoad() -
onEnable
public void onEnable() -
onDisable
public void onDisable()
-