Minestom wiki
Search…
WIP Java Interoperability
All scripts features are available through the ScriptManager class
1
// Called on startup to find all scripts and load them
2
ScriptManager.load();
3
// Retrieve all currently loaded scripts
4
ScriptManager.getScripts();
5
// Unload all scripts
6
ScriptManager.shutdown()
7
// Reload scripts
8
ScriptManager.reload();
9
// Change the permission to executor MineScript commands
10
ScriptManager.setCommandPermission(player -> player.getGameMode()==GameMode.CREATIVE);
11
// Access the features API
12
ScriptManager.API;
Copied!
ScriptManager#API gives you access to all the scripting components (directly linked to commands, eg region), and also ScriptAPI#getExecutor giving you the methods needed to run commands & signals.
Copy link
Edit on GitHub