Player Interface
Allows for manipulating the contents of a player inventory and do some action as that player if there is a bound Player Card
Functions | Description |
---|---|
consume(slot) | Makes the player eat an edible item in its inventory |
lookAt(x, y, z) | Makes the player look at a coordinate |
displayMessage(msg, [ tooltip ]) | Shows a message to the player |
The inventory functions follows the rules of the Inventory API, though the player interface isn't itself considered a inventory
consume(slot)
Description
Makes the player eat an edible item in its inventory
Parameters
- slot: number - The slot for the edible item
Returns
- boolean - The state of the operation
- string - Error message, If there is a failure on the operation
lookAt(x, y, z)
Description
Makes the player look at a coordinate
Parameters
- x: number - the target's x position,
- y: number - the target's y position,
- z: number - the target's z position
Returns
- boolean - The state of the operation
- string - Error message, If there is a failure on the operation
displayMessage(msg, [ tooltip ])
Description
Shows a message to the player
Parameters
- msg: string - a message to be sent
- ?tooltip: boolean - if the message should be display as a tooltip, instead of a chat message
Returns
- boolean - The state of the operation
- string - Error message, If there is a failure on the operation