-
Notifications
You must be signed in to change notification settings - Fork 0
Making a script
You need to have the plugin installed as well as the language addons you are going to use installed. Look here to learn how to do that.
You also should know how to use the language you desire to use. There are plenty of tutorials online, although this plugin uses them (especially JavaScript) slightly differently mainly due to the quirks of Java.
The load method doesn't exist for scripts. The script itself is run during load. Most things won't be accessible during this period, for example registering of commands or listeners.
When the server is enabled, it usually tells all the plugins that, include this one. When this one gets enabled, it tells all the scripts to enable as well. It calls the onEnable
method and on_enable
for Python (both work for Python). Here you can register commands, listeners, and all that fancy jazz.
This generally happens when the server is being shut down, thus disabling all the plugins. This plugin calls the onDisable
method and on_disable
for Python. If you're connected to an SQL database, here is where you should probably disconnect.
This happens when either the server is being reloaded (velocity), or the plugin is being reloaded (via command; PlugMan doesn't count). This is where you should reload the information used by your script.
Note: WIP