-
Notifications
You must be signed in to change notification settings - Fork 1
onPlayerPressLeftClick
KabanFriends edited this page Nov 27, 2022
·
1 revision
A function that is called when a player presses the left mouse button.
The event
object contains following fields:
player
: Player
- The Player that triggered this event.
- Yaw value of the player when this event was triggered.
- Pitch value of the player when this event was triggered.
- ID of the entity that the player was looking at when this event was triggered.
- Returns
nil
if there is no entity involved with the event.
- X coordinate of the block that the player clicked.
- Returns
nil
if the player was not looking at any block.
- Y coordinate of the block that the player clicked.
- Returns
nil
if the player was not looking at any block.
- Z coordinate of the block that the player clicked.
- Returns
nil
if the player was not looking at any block.
- Face of the block that the player clicked. Returns
nil
if the player was not looking at any block. - If there is a block involved with the event, the return value is one of the following:
towardsX
towardsY
towardsZ
awayX
awayY
awayZ