Adding CraftScript to a Server
Installing CraftScript on your server and setting up an environment.
Last updated
Installing CraftScript on your server and setting up an environment.
Last updated
CraftScript must be packaged inside a plugin.
The plugin is a domain: it decides what syntax is available, how and when scripts are to be loaded and run, what libraries are available to scripts, etc.
In order to run a CraftScript environment the following is required:
A Minecraft server.
The command framework.
The ScriptLoader
is a simple interface that takes in a stream of data (e.g. a file contents or a string) and interprets this as an executable script object.
This object can then be run by itself or loaded into a script manager.
While domains are able to create their own loaders a basic SimpleScriptLoader
is provided for most users.
A copy of this loader is available at ScriptLoader.BASIC
.
The script manager provides an environment of libraries, contexts, kinds and data for running a script.
The script manager is also responsible for dealing with any errors that occur while the script is running.