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(@org.jetbrains.annotations.Range(from=1L, to=15L) int maxLines, @Nullable Locale locale) Creates a newSidebar.@NotNull TeamManagerCreates a newTeamManager.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.megavex.scoreboardlibrary.api.ScoreboardLibrary
createSidebar, createSidebar
-
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: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 player- 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
-