Skip to content

PlayerEntity

Represents the player.

addExperiencePoints(experience_points: Integer) -> Null

Adds experience_points amount of XP points to the player.

getEnderChestInventory() -> Inventory

Returns the players ender chest inventory.

setEnderChestInventory(inventory: Inventory) -> Null

Sets the players ender chest inventory.

getInventory() -> Inventory

Returns the players inventory.

setInventory(inventory: Inventory) -> Null

Sets the players inventory.

getStackInMainHand() -> ItemStack

Returns the item stack in the players main hand.

getStackInOffHand() -> ItemStack

Returns the item stack in the players offhand.

addExperienceLevels(experience_levels: Integer) -> Null

Adds experience_levels amount of XP levels to the player.

isCreative() -> Boolean

Returns whether the player is in creative mode.

isSpectator() -> Boolean

Returns whether the player is in spectator mode.

getName() -> String

Returns the name of the player.

getUUID() -> String

Returns the UUID of the player.