Bukkit Server Mod for Javascript Integration via Rhino
Download Rhino and copy js.jar in plugins/CraftScript/lib
Put your scripts in plugins/CraftScript/scripts
and they will autoload
The JS API is built on top of Backbone and works through Backbone events. Backbone is included in the scope and you should be able to use it for your own scripts.
The Minecraft
object is a prototype of Backbone.Events and currently the following events are supported:
plugin:enable
- triggered when the plugin is enabledplugin:disable
- triggered when the plugin is disabledplayer:login
- triggered when the player has logged inplayer:command
- triggered when the player sends a commandplayer:join
- triggered when the player joins the worldplayer:quit
- triggered when the player quits the worldplayer:respawn
- triggered when the player respawns
There is limited Backbone integration and the first script loaded is the Players.js script which maps the player events to a Backbone model called Players.
- Robin Duckett <[email protected]>