player
The local player. Every getter returns nil when there is no world.
Functions
19 functions. Signatures are generated from the client, so they describe the build you are running.
player.pos() -> x:number, y:number, z:numberplayer.lastPos() -> x:number, y:number, z:numberPosition at the start of the tick, for interpolation.
player.velocity() -> x:number, y:number, z:numberplayer.rotation() -> yaw:number, pitch:numberplayer.eyeHeight() -> numberplayer.health() -> numberplayer.absorption() -> numberYellow hearts, on top of health.
player.hunger() -> number0 to 20.
player.isOnGround() -> booleanplayer.isSprinting() -> booleanplayer.isSneaking() -> booleanplayer.isInWater() -> booleanplayer.isUsingItem() -> booleanEating, drawing a bow, blocking.
player.name() -> stringplayer.sendChat(message:string)Sends as if typed. A leading '/' runs a command.
player.swingHand([offhand:boolean])player.setSprinting(state:boolean)player.setSneaking(state:boolean)player.jump()No-op when not on the ground.