Plugin
Last updated
Last updated
Represented by plugin
.
plugin.onLoad(callback: function)
Event called when the plugin has been loaded.
plugin.onEnable(callback: function)
Event called when the plugin has been enabled.
plugin.onDisable(callback: function)
Event called when the plugin has been disabled.
plugin.addCommand(options: table, callback: function)
:
Create a command. More information on creating commands can be found .
plugin.registerEvent(event: string, callback: function)
Register an event. More information on registering events can be found .
plugin.getServer()
:
Returns the server object. This is equivalent to Bukkit.getServer()
in Java.
plugin.isNaggable()
: boolean
Returns true if the plugin can nag to the log or false otherwise.
plugin.setNaggable(nag: boolean)
Set the nagging state.
plugin.exportResource(path: string, replace: boolean)
:
Export a resource from inside of the plugin workspace to the plugin's data folder.
plugin.getStorageObject(file: string)
:
Read a YAML or JSON storage file. More information and examples on storage files can be found .