Contains objectives and participants for the scoreboard.
Optional
Adds a new objective to the scoreboard.
This function can't be called in read-only mode.
This function can throw errors.
import { world } from "@minecraft/server";world.scoreboard.addObjective("example", "example"); Copy
import { world } from "@minecraft/server";world.scoreboard.addObjective("example", "example");
Clears the objective that occupies a display slot.
Identifier of the objective.
Returns a specific objective (by id).
import { world } from "@minecraft/server";const money = world.scoreboard.getObjective("money"); Copy
import { world } from "@minecraft/server";const money = world.scoreboard.getObjective("money");
Returns an objective that occupies the specified display slot.
Returns all defined objectives.
Returns all defined scoreboard identities.
Removes an objective from the scoreboard.
import { world } from "@minecraft/server";world.scoreboard.removeObjective("money"); Copy
import { world } from "@minecraft/server";world.scoreboard.removeObjective("money");
Returns the previous ScoreboardObjective set at the display slot, if no objective was previously set it returns undefined.
ScoreboardObjective
undefined
Sets an objective into a display slot with specified additional display settings.
Contains objectives and participants for the scoreboard.