Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Scoreboard

Index

Constructors

  • new Scoreboard(id: string, displayName?: string): Scoreboard
  • Creates a new Scoreboard class

    Parameters

    • id: string

      Identifier of the Objective

    • displayName: string = ""

      String to be used as the display name of the objective. Note: This will only be applied if the objective does not already exist

    Returns Scoreboard

Accessors

  • get id(): string
  • get objective(): ScoreboardObjective

Methods

  • add(target: Target, val: number): boolean
  • Adds the specified amount to the provided target on this Scoreboard

    Parameters

    • target: Target

      A Selector, Player, Entity or string representing the target

    • val: number

      The amount to add

    Returns boolean

  • Gets the score of the provided target on this Scoreboard

    Parameters

    • target: Target

      A Selector, Player, Entity or string representing the target

    Returns number

  • reset(target: Target): boolean
  • Resets the score for the provided target on this Scoreboard

    Parameters

    • target: Target

      A Selector, Player, Entity or string representing the target

    Returns boolean

    A boolean representing whether the operation was successful

  • set(target: Target, val: number): boolean
  • Sets the provided target to the specified amount on this Scoreboard

    Parameters

    • target: Target

      A Selector, Player, Entity or string representing the target

    • val: number

      The amount to set to

    Returns boolean

    A boolean representing whether the operation was successful

  • sub(target: Target, val: number): boolean
  • Subtracts the specified amount to the provided target on this Scoreboard

    Parameters

    • target: Target

      A Selector, Player, Entity or string representing the target

    • val: number

      The amount to subtract

    Returns boolean

    A boolean representing whether the operation was successful

  • exists(id: string): boolean
  • Checks if a Scoreboard has already been created

    Parameters

    • id: string

      An id used as the name of the objective

    Returns boolean

    A boolean representing whether the Scoreboard is created or not

Generated using TypeDoc version 0.22.18, the 7/5/2022