Class AbstractSidebar

java.lang.Object
net.megavex.scoreboardlibrary.implementation.sidebar.AbstractSidebar
All Implemented Interfaces:
net.megavex.scoreboardlibrary.api.sidebar.Sidebar, PlayerDisplayable
Direct Known Subclasses:
PlayerDependantLocaleSidebar, SingleLocaleSidebar

public abstract class AbstractSidebar extends Object implements net.megavex.scoreboardlibrary.api.sidebar.Sidebar, PlayerDisplayable
  • Constructor Details

    • AbstractSidebar

      public AbstractSidebar(@NotNull @NotNull ScoreboardLibraryImpl scoreboardLibrary, int maxLines, @NotNull @NotNull String objectiveName)
  • Method Details

    • internalPlayers

      @NotNull protected abstract @NotNull Set<org.bukkit.entity.Player> internalPlayers()
    • forEachLineHandler

      protected abstract void forEachLineHandler(@NotNull @NotNull Consumer<LocaleLineHandler> consumer)
    • addPlayer0

      @Nullable protected abstract @Nullable LocaleLineHandler addPlayer0(@NotNull @NotNull org.bukkit.entity.Player player)
    • removePlayer0

      @Nullable protected abstract @Nullable LocaleLineHandler removePlayer0(@NotNull @NotNull org.bukkit.entity.Player player)
    • close

      public final void close()
      Specified by:
      close in interface net.megavex.scoreboardlibrary.api.sidebar.Sidebar
    • closed

      public final boolean closed()
      Specified by:
      closed in interface net.megavex.scoreboardlibrary.api.sidebar.Sidebar
    • players

      @NotNull public final @NotNull Collection<org.bukkit.entity.Player> players()
      Specified by:
      players in interface net.megavex.scoreboardlibrary.api.sidebar.Sidebar
    • addPlayer

      public final boolean addPlayer(@NotNull @NotNull org.bukkit.entity.Player player)
      Specified by:
      addPlayer in interface net.megavex.scoreboardlibrary.api.sidebar.Sidebar
    • removePlayer

      public final boolean removePlayer(@NotNull @NotNull org.bukkit.entity.Player player)
      Specified by:
      removePlayer in interface net.megavex.scoreboardlibrary.api.sidebar.Sidebar
    • maxLines

      public final @Range(from=1L,to=15L) int maxLines()
      Specified by:
      maxLines in interface net.megavex.scoreboardlibrary.api.sidebar.Sidebar
    • objectiveName

      @NotNull public @NotNull String objectiveName()
      Specified by:
      objectiveName in interface net.megavex.scoreboardlibrary.api.sidebar.Sidebar
    • line

      public final void line(@Range(from=0L,to=14L) int index, @Nullable @Nullable net.kyori.adventure.text.ComponentLike value, @Nullable @Nullable net.megavex.scoreboardlibrary.api.objective.ScoreFormat scoreFormat)
      Specified by:
      line in interface net.megavex.scoreboardlibrary.api.sidebar.Sidebar
    • refreshLine

      public void refreshLine(@Range(from=0L,to=2147483646L) int index)
      Specified by:
      refreshLine in interface net.megavex.scoreboardlibrary.api.sidebar.Sidebar
    • line

      @Nullable public final @Nullable net.kyori.adventure.text.Component line(@Range(from=0L,to=14L) int line)
      Specified by:
      line in interface net.megavex.scoreboardlibrary.api.sidebar.Sidebar
    • title

      @NotNull public final @NotNull net.kyori.adventure.text.Component title()
      Specified by:
      title in interface net.megavex.scoreboardlibrary.api.sidebar.Sidebar
    • title

      public final void title(@NotNull @NotNull net.kyori.adventure.text.ComponentLike title)
      Specified by:
      title in interface net.megavex.scoreboardlibrary.api.sidebar.Sidebar
    • refreshTitle

      public void refreshTitle()
      Specified by:
      refreshTitle in interface net.megavex.scoreboardlibrary.api.sidebar.Sidebar
    • scoreboardLibrary

      @NotNull public final @NotNull ScoreboardLibraryImpl scoreboardLibrary()
    • packetAdapter

      public final ObjectivePacketAdapter packetAdapter()
    • lines

      @Nullable public final @Nullable GlobalLineInfo[] lines()
    • taskQueue

      @NotNull public final @NotNull Queue<SidebarTask> taskQueue()
    • display

      public final void display(@NotNull @NotNull org.bukkit.entity.Player player)
      Specified by:
      display in interface PlayerDisplayable
    • tick

      public final boolean tick()