Interface ISidebar
public interface ISidebar
-
Method Summary
Modifier and TypeMethodDescription@Nullable IArenagetArena()Coincides with the arena where the player is on.com.andrei1058.spigot.sidebar.SidebarGet sidebar lib handle.org.bukkit.entity.PlayerSidebar holder.default voidgiveUpdateTabFormat(@NotNull org.bukkit.entity.Player player, boolean skipStateCheck) Will update tab prefix and suffix for the given player on current sidebar.voidgiveUpdateTabFormat(@NotNull org.bukkit.entity.Player player, boolean skipStateCheck, @Nullable Boolean spectator) Will update tab prefix and suffix for the given player on current sidebar.booleanDeprecated, for removal: This API element is subject to removal in a future version.@NotNull List<com.andrei1058.spigot.sidebar.SidebarLine> normalizeLines(@NotNull List<String> lineArray) Convert string lines to string objects.com.andrei1058.spigot.sidebar.SidebarLinenormalizeTitle(@Nullable List<String> titleArray) Convert an animated string to an object.booleanregisterPersistentPlaceholder(com.andrei1058.spigot.sidebar.PlaceholderProvider placeholderProvider) Register a placeholder that is not going to be removed trough game state changes.voidSet sidebar content.
-
Method Details
-
getPlayer
org.bukkit.entity.Player getPlayer()Sidebar holder. -
getArena
Coincides with the arena where the player is on. -
getHandle
com.andrei1058.spigot.sidebar.Sidebar getHandle()Get sidebar lib handle. -
setContent
Set sidebar content. -
normalizeTitle
com.andrei1058.spigot.sidebar.SidebarLine normalizeTitle(@Nullable @Nullable List<String> titleArray) Convert an animated string to an object. -
normalizeLines
@NotNull @NotNull List<com.andrei1058.spigot.sidebar.SidebarLine> normalizeLines(@NotNull @NotNull List<String> lineArray) Convert string lines to string objects. -
giveUpdateTabFormat
void giveUpdateTabFormat(@NotNull @NotNull org.bukkit.entity.Player player, boolean skipStateCheck, @Nullable @Nullable Boolean spectator) Will update tab prefix and suffix for the given player on current sidebar.- Parameters:
player- format given player on current holder's sidebar.skipStateCheck- will skip checking if tab formatting is disabled.spectator- when you already know the player is a spectator. E.g. on join. Null will let the plugin whether the player is spectator or not.
-
giveUpdateTabFormat
default void giveUpdateTabFormat(@NotNull @NotNull org.bukkit.entity.Player player, boolean skipStateCheck) Will update tab prefix and suffix for the given player on current sidebar.- Parameters:
player- format given player on current holder's sidebar.skipStateCheck- will skip checking if tab formatting is disabled.
-
isTabFormattingDisabled
Deprecated, for removal: This API element is subject to removal in a future version.- Returns:
- true if tab formatting is disabled for current sidebar/ arena stage.
-
registerPersistentPlaceholder
boolean registerPersistentPlaceholder(com.andrei1058.spigot.sidebar.PlaceholderProvider placeholderProvider) Register a placeholder that is not going to be removed trough game state changes.
-