Pulcedocs

Sessions

Player session data exposed to plugins as stable handles and snapshots.

On this page

Session State

Sessions connect Bedrock identity, network metadata, locale, device data, resource-pack state, and the active player handle. Plugins read session data through snapshots so login state remains owned by the server.

  • Identity data is resolved through gameplay player and session collections.
  • Network and device details are read-only plugin data unless a documented service exposes a mutation.
  • SkinProfile is a lightweight summary; Skin returns a cloned full snapshot; SetSkin is the official mutation path.

Player Access

When code already has a player handle, use handle methods for session-linked state instead of reaching into runtime internals.

motion-network.go
motion, ok := playerHandle.Motion()
_ = motion
_ = ok

err := playerHandle.SetMotion(entity.Motion{X: 0.2, Y: 0.42, Z: 0})
_, err = playerHandle.Knockback(entity.Position{X: 0, Y: 64, Z: 0}, 0.4, 0.36)

network, ok := playerHandle.Network()
locale, _ := playerHandle.Locale()
device, _ := playerHandle.Device()
skinProfile, _ := playerHandle.SkinProfile()
skin, err := playerHandle.Skin()
_, err = playerHandle.SetSkin(skin)
_ = network
_ = ok
_ = locale
_ = device
_ = skinProfile
_ = skin