on Tell Command
Runs code when another player whispers you a certain message.
player.onTellCommand("jump", () => {
});
Parameters
- command: the chat keyword that will be associated with this command (
*
for all messages), eg: “jump” - handler: code to run when the keyword is whispered to the current player
Example
Displays a greeting message when another player whispers “hi”.
player.onTellCommand("hi", () => {
player.say("Hi, my name is " + player.name())
})