Class NoopScoreboardLibrary

java.lang.Object
net.megavex.scoreboardlibrary.api.noop.NoopScoreboardLibrary
All Implemented Interfaces:
ScoreboardLibrary

public final class NoopScoreboardLibrary extends Object implements ScoreboardLibrary
No-op implementation of ScoreboardLibrary. Can be used as a fallback when there is no packet adapter available and for unit testing.
  • Constructor Details

    • NoopScoreboardLibrary

      public NoopScoreboardLibrary()
  • Method Details

    • createSidebar

      @NotNull public @NotNull Sidebar createSidebar(@org.jetbrains.annotations.Range(from=1L, to=15L) int maxLines, @Nullable @Nullable Locale locale)
      Description copied from interface: ScoreboardLibrary
      Creates a new Sidebar.
      Specified by:
      createSidebar in interface ScoreboardLibrary
      Parameters:
      maxLines - max amount of lines the sidebar will have. Note that vanilla clients can only display at most 15
      locale - locale which will be used for translating TranslatableComponents, or null if the locale should depend on the player
      Returns:
      newly created sidebar
    • createTeamManager

      @NotNull public @NotNull TeamManager createTeamManager()
      Description copied from interface: ScoreboardLibrary
      Creates a new TeamManager.
      Specified by:
      createTeamManager in interface ScoreboardLibrary
      Returns:
      newly created team manager
    • createObjectiveManager

      @NotNull public @NotNull ObjectiveManager createObjectiveManager()
      Description copied from interface: ScoreboardLibrary
      Creates a new ObjectiveManager.
      Specified by:
      createObjectiveManager in interface ScoreboardLibrary
      Returns:
      newly created objective manager
    • close

      public void close()
      Description copied from interface: ScoreboardLibrary
      Closes this scoreboard library instance. You should call this in JavaPlugin.onDisable().
      Specified by:
      close in interface ScoreboardLibrary
    • closed

      public boolean closed()
      Specified by:
      closed in interface ScoreboardLibrary
      Returns:
      whether this scoreboard library instance is closed