-
Notifications
You must be signed in to change notification settings - Fork 0
CallContext
KabanFriends edited this page Nov 27, 2022
·
1 revision
A CallContext is an object that contains the context of a function call using /Lua call command. Call contexts are always provided as the first parameter when you use /Lua call to call a function.
player : Player
- The Player that called the function.
- X coordinate of the message block location, if the /Lua call command was used in a message block.
- Returns
nilif the function was not called from a message block.
- Y coordinate of the message block location, if the /Lua call command was used in a message block.
- Returns
nilif the function was not called from a message block.
- Z coordinate of the message block location, if the /Lua call command was used in a message block.
- Returns
nilif the function was not called from a message block.
-- "context" is the CallContext when using /Lua call myFunction to call this function
function myFunction(context)
context.player.message("Hello World!")
end