Class ScoreboardMock
java.lang.Object
be.seeseemelk.mockbukkit.scoreboard.ScoreboardMock
- All Implemented Interfaces:
Scoreboard
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclearSlot(DisplaySlot slot) @Nullable TeamgetEntityTeam(@NotNull Entity entity) getEntryTeam(@NotNull String entry) getObjective(String name) getObjective(DisplaySlot slot) getObjectivesByCriteria(@NotNull Criteria criteria) getObjectivesByCriteria(String criteria) @NotNull Set<OfflinePlayer>Deprecated.getPlayerTeam(@NotNull OfflinePlayer player) getScores(@NotNull OfflinePlayer player) getScoresFor(@NotNull Entity entity) getTeams()@NotNull ObjectiveMockregisterNewObjective(@NotNull String name, @NotNull String criteria) Deprecated.@NotNull ObjectiveMockregisterNewObjective(@NotNull String name, @NotNull String criteria, @NotNull String displayName) Deprecated.@NotNull ObjectiveMockregisterNewObjective(@NotNull String name, @NotNull String criteria, @NotNull String displayName, @NotNull RenderType renderType) Deprecated.@NotNull ObjectiveregisterNewObjective(@NotNull String name, @NotNull String criteria, @Nullable net.kyori.adventure.text.Component displayName) @NotNull ObjectiveregisterNewObjective(@NotNull String name, @NotNull String criteria, @Nullable net.kyori.adventure.text.Component displayName, @NotNull RenderType renderType) @NotNull ObjectiveregisterNewObjective(@NotNull String name, @NotNull Criteria criteria, @NotNull String displayName) @NotNull ObjectiveregisterNewObjective(@NotNull String name, @NotNull Criteria criteria, @NotNull String displayName, @NotNull RenderType renderType) @NotNull ObjectiveregisterNewObjective(@NotNull String name, @NotNull Criteria criteria, @Nullable net.kyori.adventure.text.Component displayName) @NotNull ObjectiveregisterNewObjective(@NotNull String name, @NotNull Criteria criteria, @Nullable net.kyori.adventure.text.Component displayName, @NotNull RenderType renderType) @NotNull TeamregisterNewTeam(@NotNull String name) voidresetScores(@NotNull String entry) voidresetScores(@NotNull OfflinePlayer player) voidresetScoresFor(@NotNull Entity entity) protected voidsetDisplaySlot(@NotNull ObjectiveMock objective, DisplaySlot slot) Sets the objective to a specific slot.protected voidunregister(@NotNull ObjectiveMock objectiveMock) Removes an objective off this scoreboard.protected voidunregister(@NotNull TeamMock teamMock) Removes a team from this scoreboard.
-
Constructor Details
-
ScoreboardMock
public ScoreboardMock()
-
-
Method Details
-
registerNewObjective
@Deprecated @NotNull public @NotNull ObjectiveMock registerNewObjective(@NotNull @NotNull String name, @NotNull @NotNull String criteria) throws IllegalArgumentException Deprecated.- Specified by:
registerNewObjectivein interfaceScoreboard- Throws:
IllegalArgumentException
-
registerNewObjective
@NotNull public @NotNull Objective registerNewObjective(@NotNull @NotNull String name, @NotNull @NotNull String criteria, @Nullable @Nullable net.kyori.adventure.text.Component displayName) throws IllegalArgumentException - Specified by:
registerNewObjectivein interfaceScoreboard- Throws:
IllegalArgumentException
-
registerNewObjective
@NotNull public @NotNull Objective registerNewObjective(@NotNull @NotNull String name, @NotNull @NotNull String criteria, @Nullable @Nullable net.kyori.adventure.text.Component displayName, @NotNull @NotNull RenderType renderType) throws IllegalArgumentException - Specified by:
registerNewObjectivein interfaceScoreboard- Throws:
IllegalArgumentException
-
registerNewObjective
@NotNull public @NotNull Objective registerNewObjective(@NotNull @NotNull String name, @NotNull @NotNull Criteria criteria, @Nullable @Nullable net.kyori.adventure.text.Component displayName) throws IllegalArgumentException - Specified by:
registerNewObjectivein interfaceScoreboard- Throws:
IllegalArgumentException
-
registerNewObjective
@NotNull public @NotNull Objective registerNewObjective(@NotNull @NotNull String name, @NotNull @NotNull Criteria criteria, @Nullable @Nullable net.kyori.adventure.text.Component displayName, @NotNull @NotNull RenderType renderType) throws IllegalArgumentException - Specified by:
registerNewObjectivein interfaceScoreboard- Throws:
IllegalArgumentException
-
registerNewObjective
@Deprecated @NotNull public @NotNull ObjectiveMock registerNewObjective(@NotNull @NotNull String name, @NotNull @NotNull String criteria, @NotNull @NotNull String displayName) throws IllegalArgumentException Deprecated.- Specified by:
registerNewObjectivein interfaceScoreboard- Throws:
IllegalArgumentException
-
registerNewObjective
@Deprecated @NotNull public @NotNull ObjectiveMock registerNewObjective(@NotNull @NotNull String name, @NotNull @NotNull String criteria, @NotNull @NotNull String displayName, @NotNull @NotNull RenderType renderType) throws IllegalArgumentException Deprecated.- Specified by:
registerNewObjectivein interfaceScoreboard- Throws:
IllegalArgumentException
-
registerNewObjective
@NotNull public @NotNull Objective registerNewObjective(@NotNull @NotNull String name, @NotNull @NotNull Criteria criteria, @NotNull @NotNull String displayName) throws IllegalArgumentException - Specified by:
registerNewObjectivein interfaceScoreboard- Throws:
IllegalArgumentException
-
registerNewObjective
@NotNull public @NotNull Objective registerNewObjective(@NotNull @NotNull String name, @NotNull @NotNull Criteria criteria, @NotNull @NotNull String displayName, @NotNull @NotNull RenderType renderType) throws IllegalArgumentException - Specified by:
registerNewObjectivein interfaceScoreboard- Throws:
IllegalArgumentException
-
getObjective
- Specified by:
getObjectivein interfaceScoreboard- Throws:
IllegalArgumentException
-
getObjectivesByCriteria
@NotNull public @NotNull Set<Objective> getObjectivesByCriteria(String criteria) throws IllegalArgumentException - Specified by:
getObjectivesByCriteriain interfaceScoreboard- Throws:
IllegalArgumentException
-
getObjectivesByCriteria
@NotNull public @NotNull Set<Objective> getObjectivesByCriteria(@NotNull @NotNull Criteria criteria) throws IllegalArgumentException - Specified by:
getObjectivesByCriteriain interfaceScoreboard- Throws:
IllegalArgumentException
-
getObjectives
- Specified by:
getObjectivesin interfaceScoreboard
-
getObjective
- Specified by:
getObjectivein interfaceScoreboard- Throws:
IllegalArgumentException
-
getScores
@NotNull public @NotNull Set<Score> getScores(@NotNull @NotNull OfflinePlayer player) throws IllegalArgumentException - Specified by:
getScoresin interfaceScoreboard- Throws:
IllegalArgumentException
-
getScores
@NotNull public @NotNull Set<Score> getScores(@NotNull @NotNull String entry) throws IllegalArgumentException - Specified by:
getScoresin interfaceScoreboard- Throws:
IllegalArgumentException
-
resetScores
- Specified by:
resetScoresin interfaceScoreboard- Throws:
IllegalArgumentException
-
resetScores
- Specified by:
resetScoresin interfaceScoreboard- Throws:
IllegalArgumentException
-
getPlayerTeam
- Specified by:
getPlayerTeamin interfaceScoreboard- Throws:
IllegalArgumentException
-
getEntryTeam
- Specified by:
getEntryTeamin interfaceScoreboard- Throws:
IllegalArgumentException
-
getTeam
- Specified by:
getTeamin interfaceScoreboard- Throws:
IllegalArgumentException
-
getTeams
- Specified by:
getTeamsin interfaceScoreboard
-
registerNewTeam
@NotNull public @NotNull Team registerNewTeam(@NotNull @NotNull String name) throws IllegalArgumentException - Specified by:
registerNewTeamin interfaceScoreboard- Throws:
IllegalArgumentException
-
getPlayers
Deprecated.- Specified by:
getPlayersin interfaceScoreboard
-
getEntries
- Specified by:
getEntriesin interfaceScoreboard
-
clearSlot
- Specified by:
clearSlotin interfaceScoreboard- Throws:
IllegalArgumentException
-
getScoresFor
@NotNull public @NotNull Set<Score> getScoresFor(@NotNull @NotNull Entity entity) throws IllegalArgumentException - Specified by:
getScoresForin interfaceScoreboard- Throws:
IllegalArgumentException
-
resetScoresFor
- Specified by:
resetScoresForin interfaceScoreboard- Throws:
IllegalArgumentException
-
getEntityTeam
@Nullable public @Nullable Team getEntityTeam(@NotNull @NotNull Entity entity) throws IllegalArgumentException - Specified by:
getEntityTeamin interfaceScoreboard- Throws:
IllegalArgumentException
-
setDisplaySlot
Sets the objective to a specific slot.- Parameters:
objective- The objective to set to the slot.slot- The slot to set the objective to.
-
unregister
Removes an objective off this scoreboard.- Parameters:
objectiveMock- The objective to remove.
-
unregister
Removes a team from this scoreboard.- Parameters:
teamMock- The team to remove.
-