Class Scoreboard

Represent a scoreboard

Hierarchy

  • Scoreboard

Constructors

Properties

Methods

Constructors

Properties

edit: { hide: (() => string); rename: ((display: "" | JsonRaw) => string); show: ((location: sbLocation) => string) } = ...

Edit the scoreboard

Type declaration

  • hide: (() => string)
      • (): string
      • Hide the scoreboard

        Returns string

  • rename: ((display: "" | JsonRaw) => string)
      • (display: "" | JsonRaw): string
      • Edit the displayed name of the scoreboard

        Parameters

        • display: "" | JsonRaw

          The new displayed name

        Returns string

  • show: ((location: sbLocation) => string)
      • (location: sbLocation): string
      • Set the scoreboard position

        Parameters

        • location: sbLocation

          The location to show the scoreboard to

        Returns string

name: string
options: sbSettings
players?: { add: ((entity: string | Entity, value: number) => string); delete: ((entity: string | Entity) => string); enable: ((entity: Entity) => string); get: ((entity: string | Entity) => string); operation: ((entity: string | Entity, operation: sbOpertations, target: { entity: string | Entity; scoreboard: Scoreboard }) => string); set: ((entity: string | Entity, value: number) => string); store: ((entity: string | Entity, type: "success" | "result", from: string) => string); subtract: ((entity: Entity, value: number) => string) } = ...

Manage the player's value of the scoreboard

Type declaration

  • add: ((entity: string | Entity, value: number) => string)
      • (entity: string | Entity, value: number): string
      • Add a value to an entity

        Parameters

        • entity: string | Entity

          The value to set to

        • value: number

          The value to add to the current entity's score

        Returns string

  • delete: ((entity: string | Entity) => string)
      • (entity: string | Entity): string
      • Delete/reset the score of an entity

        Parameters

        • entity: string | Entity

          The entity to delete the score to

        Returns string

  • enable: ((entity: Entity) => string)
      • (entity: Entity): string
      • If the scoreboard is a trigger, enable it for some entities

        Parameters

        • entity: Entity

          Entity to enable trigger for

        Returns string

  • get: ((entity: string | Entity) => string)
      • (entity: string | Entity): string
      • Get the value of an entity

        Parameters

        • entity: string | Entity

          The entity to get the value for

        Returns string

  • operation: ((entity: string | Entity, operation: sbOpertations, target: { entity: string | Entity; scoreboard: Scoreboard }) => string)
      • (entity: string | Entity, operation: sbOpertations, target: { entity: string | Entity; scoreboard: Scoreboard }): string
      • Set a value relatively from another entity

        Parameters

        • entity: string | Entity

          The entity to modify the value

        • operation: sbOpertations

          The operation before set the value

        • target: { entity: string | Entity; scoreboard: Scoreboard }

          The target entity to get the value for

        Returns string

  • set: ((entity: string | Entity, value: number) => string)
      • (entity: string | Entity, value: number): string
      • Set the value of an entity

        Parameters

        • entity: string | Entity

          The value to set to

        • value: number

          The value

        Returns string

  • store: ((entity: string | Entity, type: "success" | "result", from: string) => string)
      • (entity: string | Entity, type: "success" | "result", from: string): string
      • Store a command execute to an entity's value

        Parameters

        • entity: string | Entity

          The value to set to

        • type: "success" | "result"

          The type of result you want:
          success: If the command has been correcly executed, it will returns 1, else 0
          result: Will returns the callback of the executed command

        • from: string

          The command to execute

        Returns string

  • subtract: ((entity: Entity, value: number) => string)
      • (entity: Entity, value: number): string
      • Subtract a value to an entity

        Parameters

        • entity: Entity

          The value to set to

        • value: number

          The value to remove to the current entity's score

        Returns string

Methods

  • Create the scoreboard

    Parameters

    • Optional force: boolean

      If true, it will deletes all the same scoreboard's name then create this one

    Returns string | string[]

Generated using TypeDoc