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
  • Field Summary

    Fields inherited from interface net.megavex.scoreboardlibrary.api.sidebar.Sidebar

    MAX_LINES
  • Constructor Summary

    Constructors
    Constructor
    Description
    AbstractSidebar(@NotNull ScoreboardLibraryImpl scoreboardLibrary, int maxLines, @NotNull String objectiveName)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    addPlayer(@NotNull org.bukkit.entity.Player player)
     
    protected abstract @Nullable LocaleLineHandler
    addPlayer0(@NotNull org.bukkit.entity.Player player)
     
    final void
     
    final boolean
     
    final void
    display(@NotNull org.bukkit.entity.Player player)
     
    protected abstract void
     
    protected abstract @NotNull Set<org.bukkit.entity.Player>
     
    final @Nullable net.kyori.adventure.text.Component
    line(@org.jetbrains.annotations.Range(from=0L, to=14L) int line)
     
    final void
    line(@org.jetbrains.annotations.Range(from=0L, to=14L) int index, @Nullable net.kyori.adventure.text.ComponentLike value, @Nullable net.megavex.scoreboardlibrary.api.objective.ScoreFormat scoreFormat)
     
    final @Nullable GlobalLineInfo[]
     
    final @org.jetbrains.annotations.Range(from=1L, to=15L) int
     
    @NotNull String
     
    final net.megavex.scoreboardlibrary.implementation.packetAdapter.objective.ObjectivePacketAdapter
     
    final @NotNull Collection<org.bukkit.entity.Player>
     
    void
    refreshLine(@org.jetbrains.annotations.Range(from=0L, to=2147483646L) int index)
     
    void
     
    final boolean
    removePlayer(@NotNull org.bukkit.entity.Player player)
     
    protected abstract @Nullable LocaleLineHandler
    removePlayer0(@NotNull org.bukkit.entity.Player player)
     
    final @NotNull ScoreboardLibraryImpl
     
    final @NotNull Queue<SidebarTask>
     
    final boolean
     
    final @NotNull net.kyori.adventure.text.Component
     
    final void
    title(@NotNull net.kyori.adventure.text.ComponentLike title)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.megavex.scoreboardlibrary.api.sidebar.Sidebar

    addPlayers, clearLines, line, locale, refreshLines, removePlayers
  • 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 @org.jetbrains.annotations.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(@org.jetbrains.annotations.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(@org.jetbrains.annotations.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(@org.jetbrains.annotations.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 net.megavex.scoreboardlibrary.implementation.packetAdapter.objective.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()