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