Script Manager
object ScriptManager
The ScriptManager allows to extend the client by loading supported scripts at runtime. Scripts can be written in various languages when installed through GraalVM and can interact with the client through the Script API.
Scripts are stored in the scripts directory and can be organized in subdirectories when using a main script file.
Functions
Link copied to clipboard
Disables all loaded scripts. This method iterates over the list of loaded scripts and disables each one.
Link copied to clipboard
Link copied to clipboard
fun loadScript(file: File, language: String = Source.findLanguage(file), debugOptions: ScriptDebugOptions = ScriptDebugOptions()): PolyglotScript
Loads a script from a file. This method creates a new Script object, initializes it, and adds it to the list of loaded scripts.
Link copied to clipboard
Unloads a specific script. This method disables the script and removes it from the list of loaded scripts.