Sidebar
A plugin-owned sidebar with shared content and lightweight per-player views.
Bedriox\Api\Scoreboard\Sidebar
classBedriox\Api\Scoreboard
Public methods
__construct(string $id, Closure $state, Closure $mutate, Closure $getViewFor, Closure $showTo, Closure $hideFrom, Closure $isShowingTo, Closure $showToAll, Closure $hideFromAll, Closure $remove)Typed public method.
getId(): stringTyped public method.
getTitle(): stringTyped public method.
setTitle(string $title): voidTyped public method.
getLines(): arrayTyped public method.
getLine(string $key): ?stringTyped public method.
hasLine(string $key): boolTyped public method.
setLine(string $key, string $text, ?int $position = null): voidPositions are one-based. Omitting one appends a new line and preserves an existing line's position.
prependLine(string $key, string $text): voidTyped public method.
insertBefore(string $existingKey, string $key, string $text): voidTyped public method.
insertAfter(string $existingKey, string $key, string $text): voidTyped public method.
moveLine(string $key, int $position): voidTyped public method.
removeLine(string $key): boolTyped public method.
clearLines(): voidTyped public method.
replaceLines(array $lines): voidTyped public method.
getViewFor(Bedriox\Api\Player\Player $player): Bedriox\Api\Scoreboard\SidebarViewReturns the same logical view whenever called for the same sidebar and player UUID.
showTo(Bedriox\Api\Player\Player $player): voidTyped public method.
hideFrom(Bedriox\Api\Player\Player $player): voidTyped public method.
isShowingTo(Bedriox\Api\Player\Player $player): boolTyped public method.
getViewers(): arrayTyped public method.
showToAll(): voidTyped public method.
hideFromAll(): voidTyped public method.
isRemoved(): boolTyped public method.
remove(): voidTyped public method.
static validateText(string $text, string $field): voidTyped public method.
static validateLineKey(string $key): voidTyped public method.
Constants
MAXIMUM_LINESMAXIMUM_TEXT_BYTESMAXIMUM_LINE_KEY_BYTES
