BedrioxDOCUMENTATION
API CLASS

ScoreboardObjective

A plugin-owned numeric scoreboard objective.

Bedriox\Api\Scoreboard\ScoreboardObjective
classBedriox\Api\Scoreboard

Public methods

__construct(string $id, Closure $state, Closure $setDisplayName, Closure $getScore, Closure $setScore, Closure $showTo, Closure $hideFrom, Closure $isShowingTo, Closure $remove)

Typed public method.

getId(): string

Typed public method.

getDisplayName(): string

Typed public method.

setDisplayName(string $displayName): void

Typed public method.

getScore(Bedriox\Api\Player\Player|Bedriox\Api\Entity\Entity|string $holder): ?int

Typed public method.

setScore(Bedriox\Api\Player\Player|Bedriox\Api\Entity\Entity|string $holder, int $score): void

Typed public method.

addScore(Bedriox\Api\Player\Player|Bedriox\Api\Entity\Entity|string $holder, int $amount): int

Typed public method.

subtractScore(Bedriox\Api\Player\Player|Bedriox\Api\Entity\Entity|string $holder, int $amount): int

Typed public method.

resetScore(Bedriox\Api\Player\Player|Bedriox\Api\Entity\Entity|string $holder): bool

Typed public method.

showTo(Bedriox\Api\Player\Player $player, Bedriox\Api\Scoreboard\ScoreboardDisplaySlot $slot = \Bedriox\Api\Scoreboard\ScoreboardDisplaySlot::SIDEBAR, Bedriox\Api\Scoreboard\ScoreboardSortOrder $sortOrder = \Bedriox\Api\Scoreboard\ScoreboardSortOrder::DESCENDING): void

Typed public method.

hideFrom(Bedriox\Api\Player\Player $player, Bedriox\Api\Scoreboard\ScoreboardDisplaySlot $slot = \Bedriox\Api\Scoreboard\ScoreboardDisplaySlot::SIDEBAR): void

Typed public method.

isShowingTo(Bedriox\Api\Player\Player $player, Bedriox\Api\Scoreboard\ScoreboardDisplaySlot $slot = \Bedriox\Api\Scoreboard\ScoreboardDisplaySlot::SIDEBAR): bool

Typed public method.

isRemoved(): bool

Typed public method.

remove(): void

Typed public method.

static validateDisplayName(string $displayName): void

Typed public method.

Constants

MAXIMUM_DISPLAY_NAME_BYTESMAXIMUM_FAKE_NAME_BYTESMINIMUM_SCOREMAXIMUM_SCORE

View exact source ↗