Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Scoreboard

Velt's Scoreboard utility

Hierarchy

  • Scoreboard

Index

Constructors

Properties

Methods

Constructors

constructor

  • new Scoreboard(name: string | ScoreboardOpts): Scoreboard
  • new Scoreboard(name: string, opts: ScoreboardOpts): Scoreboard
  • new Scoreboard(name: string, slot: number, opts: ScoreboardOpts): Scoreboard
  • new Scoreboard(name: string, slot: number, type: string): Scoreboard
  • new Scoreboard(name: string, slot: number, type: string, scores: any): Scoreboard
  • Create a scoreboard from the given name, slot, type, scores, and options

    Parameters

    • name: string | ScoreboardOpts

      The name of the scoreboard, or the given options

    Returns Scoreboard

  • Parameters

    • name: string
    • opts: ScoreboardOpts

    Returns Scoreboard

  • Parameters

    • name: string
    • slot: number
    • opts: ScoreboardOpts

    Returns Scoreboard

  • Parameters

    • name: string
    • slot: number
    • type: string

    Returns Scoreboard

  • Parameters

    • name: string
    • slot: number
    • type: string
    • scores: any

    Returns Scoreboard

Properties

name

name: string

The name of the scoreboard

slot

slot: number

The display slot of the scoreboard

Methods

set

  • Set one or more scores of the scoreboard to replacement values

    Parameters

    • index: number
    • text: string

    Returns Scoreboard

  • Parameters

    • scores: {}
      • [prop: number]: string

    Returns Scoreboard

  • Parameters

    • scores: (string | [number, string])[]

    Returns void | Scoreboard

setName

  • Set the name of the scoreboard to the given replacement name

    Parameters

    • name: string

      The name to change the scoreboard to

    Returns Scoreboard

setScore

  • setScore(index: number, text: string): Scoreboard
  • Set a score of the scoreboard to a new value

    Parameters

    • index: number

      The score of the scoreboard to replace

    • text: string

      The new value to replace the score with

    Returns Scoreboard

setSlot

  • Set the display slot of the scoreboard to a different slot

    Parameters

    • slot: number

      The slot to set the scoreboard to

    Returns Scoreboard

show

  • Show this scoreboard to one or more players

    Parameters

    • Rest ...players: any[]

      The players to show the scoreboard to

    Returns Scoreboard

Generated using TypeDoc