Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Hierarchy

  • PlayerActor

Index

Constructors

Methods

  • addExperience(amount: number): void
  • addItemToInventory(id: number, count: number, data: number, extra: ItemExtraData, dropRemaining: boolean): void
  • Adds item to player's inventory

    Parameters

    • id: number
    • count: number
    • data: number
    • extra: ItemExtraData
    • dropRemaining: boolean

      if true, surplus will be dropped near player

    Returns void

  • getDimension(): number
  • getExhaustion(): number
  • getExperience(): number
  • getGameMode(): number
  • getHunger(): number
  • getItemUseDuration(): number
  • getItemUseIntervalProgress(): number
  • getItemUseStartupProgress(): number
  • getLevel(): number
  • getSaturation(): number
  • getScore(): number
  • getSelectedSlot(): number
  • getUid(): number
  • isValid(): boolean
  • setArmor(slot: number, id: number, count: number, data: number, extra: ItemExtraData): void
  • setExhaustion(value: number): void
  • setExperience(value: number): void
  • setHunger(value: number): void
  • setInventorySlot(slot: number, id: number, count: number, data: number, extra: ItemExtraData): void
  • setLevel(level: number): void
  • setRespawnCoords(x: number, y: number, z: number): void
  • Sets respawn coords for the player.

    Parameters

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

    Returns void

  • setSaturation(value: number): void
  • setScore(value: number): void
  • setSelectedSlot(slot: number): void
  • 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