-
Notifications
You must be signed in to change notification settings - Fork 2
Commands
TheMode edited this page Mar 8, 2021
·
3 revisions
Each command can have or not additional data returned on execution.
For example when running /health add Notch 10 you might want to know if the command was successful, how much health the player had previously, etc...
You can execute commands like so:
let data = executor.run("help")
// Use 'data'...Sometimes, you might prefer to run a command as if the sender was a specific player:
// You cannot create a player object from nothing, it can be retrieved from an event or command.
let data = executor.runAs(player, "help")
// Use 'data'...Each command has its own data members hence this page.
The default command pack is visible here.
Each command should be placed in a category, which currently include world and entity. As the name implies, the first one should include commands related to the world, and the second to entities.