Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PlayerActor

Class to manipulate with separate players. It is temporary! It exists only 1 server tick!

Hierarchy

  • PlayerActor

Index

Constructors

constructor

Methods

addExperience

  • addExperience(amount: number): void

addItemToInventory

  • addItemToInventory(id: number, count: number, data: number, extra?: ItemExtraData | null, dropRemainings?: boolean): void
  • Adds item to player's inventory

    Parameters

    • id: number
    • count: number
    • data: number
    • Optional extra: ItemExtraData | null
    • Optional dropRemainings: boolean

      if true, surplus will be dropped near player

    Returns void

getArmor

getDimension

  • getDimension(): number

getExhaustion

  • getExhaustion(): number

getExperience

  • getExperience(): number

getGameMode

  • getGameMode(): number

getHunger

  • getHunger(): number

getInventorySlot

getLevel

  • getLevel(): number

getSaturation

  • getSaturation(): number

getScore

  • getScore(): number

getSelectedSlot

  • getSelectedSlot(): number

isValid

  • isValid(): boolean

setArmor

  • setArmor(slot: number, id: number, count: number, data: number, extra?: ItemExtraData | null): void
  • Sets armor slot's contents.

    Parameters

    • slot: number
    • id: number
    • count: number
    • data: number
    • Optional extra: ItemExtraData | null

    Returns void

setExhaustion

  • setExhaustion(value: number): void

setExperience

  • setExperience(value: number): void

setHunger

  • setHunger(value: number): void

setInventorySlot

  • setInventorySlot(slot: number, id: number, count: number, data: number, extra?: ItemExtraData | null): void
  • Sets inventory slot's contents.

    Parameters

    • slot: number
    • id: number
    • count: number
    • data: number
    • Optional extra: ItemExtraData | null

    Returns void

setLevel

  • setLevel(level: number): void

setRespawnCoords

  • setRespawnCoords(x: number, y: number, z: number): void
  • Sets respawn coords for the player.

    Parameters

    • x: number
    • y: number
    • z: number

    Returns void

setSaturation

  • setSaturation(value: number): void

setScore

  • setScore(value: number): void

setSelectedSlot

  • setSelectedSlot(slot: number): void

spawnExpOrbs

  • spawnExpOrbs(x: number, y: number, z: number, value: number): void
  • Spawns exp on coords.

    Parameters

    • x: number
    • y: number
    • z: number
    • value: number

      experience points value

    Returns void

Generated using TypeDoc