General game and client related functions
client.error(msg, type: optional)
client.log(msg, type: optional)
Prints an error/log using any of the three types:
0: Notification1: Console2: ChatDefault is
0.
client.exec(...)
Executes a chat command.
client.fps()
Returns the average FPS of the game.
client.go_to(x, y, z)
Uses the internal pathfinder to walk to coordinates.
client.key_state(key: number)
Returns true if the key is pressed or nil on failure.
client.latency()
Returns game server latency in miliseconds.
client.msg(...)
Sends a chat message.
client.pos()
Returns the local player position.
client.rot(pitch, yaw, x: optional)
Gets or sets the local player’s rotation.
x: booldetermines if the smoothing algorithm will be used.
client.set_event_callback(event_name, callback)
Registers the function as a callback for the specified event.
client.spectator()
Returns the UUIDs of all players looking towards you.
client.tps()
Returns server tickrate.
client.unset_event_callback(event_name, callback)
Removes a callback that was previously registered for the specified event.
client.visible(x, y, z)
Returns true if the position is visible from the local player eye position.
client.window_size()
Returns the window size in pixels.