Class NoopScoreboardLibrary
java.lang.Object
net.megavex.scoreboardlibrary.api.noop.NoopScoreboardLibrary
- All Implemented Interfaces:
ScoreboardLibrary
No-op implementation of
ScoreboardLibrary.
Can be used as a fallback when there is no packet adapter available
and for unit testing.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes this scoreboard library instance.booleanclosed()@NotNull ObjectiveManagerCreates a newObjectiveManager.@NotNull SidebarcreateSidebar(@Range(from=1L,to=2147483647L) int maxLines, @Nullable Locale locale, @NotNull String objectiveName) Creates a newSidebar.@NotNull TeamManagerCreates a newTeamManager.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ScoreboardLibrary
createSidebar, createSidebar, createSidebar
-
Constructor Details
-
NoopScoreboardLibrary
public NoopScoreboardLibrary()
-
-
Method Details
-
createSidebar
@NotNull public @NotNull Sidebar createSidebar(@Range(from=1L,to=2147483647L) int maxLines, @Nullable @Nullable Locale locale, @NotNull @NotNull String objectiveName) Description copied from interface:ScoreboardLibraryCreates a newSidebar.- Specified by:
createSidebarin interfaceScoreboardLibrary- Parameters:
maxLines- max amount of lines the sidebar will have. Note that vanilla clients can only display at most 15locale- locale which will be used for translatingTranslatableComponents, or null if the locale should depend on the playerobjectiveName- objective name the sidebar should use- Returns:
- newly created sidebar
-
createTeamManager
Description copied from interface:ScoreboardLibraryCreates a newTeamManager.- Specified by:
createTeamManagerin interfaceScoreboardLibrary- Returns:
- newly created team manager
-
createObjectiveManager
Description copied from interface:ScoreboardLibraryCreates a newObjectiveManager.- Specified by:
createObjectiveManagerin interfaceScoreboardLibrary- Returns:
- newly created objective manager
-
close
public void close()Description copied from interface:ScoreboardLibraryCloses this scoreboard library instance. You should call this inJavaPlugin.onDisable().- Specified by:
closein interfaceScoreboardLibrary
-
closed
public boolean closed()- Specified by:
closedin interfaceScoreboardLibrary- Returns:
- whether this scoreboard library instance is closed
-