Plugin
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.registerEvent(event: string, callback: function)
Register an event. More information on registering events can be found here.
plugin.getServer()
: org.bukkit.ServerReturns the server object. This is equivalent to
Bukkit.getServer()
in Java.plugin.isNaggable()
: booleanReturns 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)
: StorageObjectRead a YAML or JSON storage file. More information and examples on storage files can be found here.
Last updated