Skip to content

Commands

TheMode edited this page Mar 8, 2021 · 3 revisions

Overview

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.

Commands

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.

Clone this wiki locally