Skip to content

ScriptingPlayer, world, entities

player

player.inWorld
player.name  player.uuid
player.x  player.y  player.z  player.yaw  player.pitch
player.health  player.maxHealth
player.onGround  player.sneaking  player.sprinting
player.inScreen  player.screen
player.ping
player.entity                  // yourself as a PlayerRef

player always exists; outside a world its numbers are zero and player.inWorld is false.

world

world.loaded
world.players()                // loaded player entities
world.entities()
world.player('Notch')
world.getBlock(x, y, z)        // 'minecraft:bed', or '' when nothing is there
world.isAir(x, y, z)
world.time()
world.lobbyCount()
world.server()

Entities

An entity has:

.valid .type .name .uuid .id .x .y .z .yaw .pitch .onGround .sneaking .sprinting .invisible .burning .inWater .health .maxHealth .distance .self

plus .renderX(partial) and friends for drawing.

A player additionally has .spawned .stats .threat .tier .tierColour .tag .partyMember .ping.

Tab-list-only players

A player who is only a tab-list row (most of a pre-game lobby) has .spawned === false and zero coordinates. Everything else still works: stats, threat and tags resolve from the tab list.