Class SidebarRender
java.lang.Object
dev.itsharshxd.zentrix.api.scoreboard.SidebarRender
One sidebar about to be shown to one player, which a
SidebarContributor may change.
Title and lines are rendered text in Zentrix's colour format (& codes and
&#RRGGBB hex colours), with Zentrix's own placeholders and PlaceholderAPI already
resolved. A sidebar shows at most 15 lines; extra lines are dropped. Text a
contributor adds is shown as written, so it must respect identity masking itself - use the
player's display name rather than their real one.
- Since:
- 1.8.0
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSidebarRender(@NotNull org.bukkit.entity.Player player, @Nullable ZentrixGame game, @NotNull String title, @NotNull List<String> lines) -
Method Summary
Modifier and TypeMethodDescription@NotNull Optional<ZentrixGame> getGame()The match the player is in or spectates; empty for the lobby sidebar and anywhere outside a match.getLines()The lines, top to bottom; listeners may change the list.@NotNull org.bukkit.entity.PlayerThe player who will see the sidebar.@NotNull StringgetTitle()The title.voidReplaces the title.
-
Field Details
-
MAX_LINES
public static final int MAX_LINESThe most lines a sidebar can show.- See Also:
-
-
Constructor Details
-
SidebarRender
public SidebarRender(@NotNull @NotNull org.bukkit.entity.Player player, @Nullable @Nullable ZentrixGame game, @NotNull @NotNull String title, @NotNull @NotNull List<String> lines)
-
-
Method Details
-
getPlayer
@NotNull public @NotNull org.bukkit.entity.Player getPlayer()The player who will see the sidebar. -
getGame
The match the player is in or spectates; empty for the lobby sidebar and anywhere outside a match. -
getTitle
The title. -
setTitle
Replaces the title. -
getLines
The lines, top to bottom; listeners may change the list. Null entries are not allowed.
-