BedrioxDOCUMENTATION
API CLASS

SidebarView

A lightweight player-specific projection of one shared sidebar.

Bedriox\Api\Scoreboard\SidebarView
classBedriox\Api\Scoreboard

Public methods

__construct(Bedriox\Api\Scoreboard\Sidebar $sidebar, Closure $player, Closure $state, Closure $mutate)

Typed public method.

getSidebar(): Bedriox\Api\Scoreboard\Sidebar

Typed public method.

getPlayer(): Bedriox\Api\Player\Player

Typed public method.

getTitle(): string

Typed public method.

setTitle(string $title): void

Typed public method.

resetTitle(): void

Typed public method.

getLines(): array

Typed public method.

getLine(string $key): ?string

Typed public method.

setLine(string $key, string $text): void

Overrides an existing shared line or appends a player-only line.

removeLine(string $key): void

Hides a line in this view without changing the shared sidebar.

resetLine(string $key): void

Removes this player's override and restores the shared line, if one exists.

resetOverrides(): void

Typed public method.

show(): void

Typed public method.

hide(): void

Typed public method.

isShowing(): bool

Typed public method.

isRemoved(): bool

Typed public method.

View exact source ↗