Class ScoreboardMock
java.lang.Object
be.seeseemelk.mockbukkit.scoreboard.ScoreboardMock
- All Implemented Interfaces:
org.bukkit.scoreboard.Scoreboard
Mock implementation of a
Scoreboard.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclearSlot(@NotNull org.bukkit.scoreboard.DisplaySlot slot) @Nullable org.bukkit.scoreboard.TeamgetEntityTeam(@NotNull org.bukkit.entity.Entity entity) org.bukkit.scoreboard.TeamgetEntryTeam(@NotNull String entry) getObjective(@NotNull String name) getObjective(@NotNull org.bukkit.scoreboard.DisplaySlot slot) @NotNull Set<org.bukkit.scoreboard.Objective> @NotNull Set<org.bukkit.scoreboard.Objective> getObjectivesByCriteria(@NotNull String criteria) @NotNull Set<org.bukkit.scoreboard.Objective> getObjectivesByCriteria(@NotNull org.bukkit.scoreboard.Criteria criteria) @NotNull Set<org.bukkit.OfflinePlayer> Deprecated.org.bukkit.scoreboard.TeamgetPlayerTeam(@NotNull org.bukkit.OfflinePlayer player) @NotNull Set<org.bukkit.scoreboard.Score> @NotNull Set<org.bukkit.scoreboard.Score> getScores(@NotNull org.bukkit.OfflinePlayer player) @NotNull Set<org.bukkit.scoreboard.Score> getScoresFor(@NotNull org.bukkit.entity.Entity entity) org.bukkit.scoreboard.Team@NotNull Set<org.bukkit.scoreboard.Team> 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 org.bukkit.scoreboard.RenderType renderType) Deprecated.@NotNull ObjectiveMockregisterNewObjective(@NotNull String name, @NotNull String criteria, @Nullable net.kyori.adventure.text.Component displayName) @NotNull ObjectiveMockregisterNewObjective(@NotNull String name, @NotNull String criteria, @Nullable net.kyori.adventure.text.Component displayName, @NotNull org.bukkit.scoreboard.RenderType renderType) @NotNull ObjectiveMockregisterNewObjective(@NotNull String name, @NotNull org.bukkit.scoreboard.Criteria criteria, @NotNull String displayName) @NotNull ObjectiveMockregisterNewObjective(@NotNull String name, @NotNull org.bukkit.scoreboard.Criteria criteria, @NotNull String displayName, @NotNull org.bukkit.scoreboard.RenderType renderType) @NotNull ObjectiveMockregisterNewObjective(@NotNull String name, @NotNull org.bukkit.scoreboard.Criteria criteria, @Nullable net.kyori.adventure.text.Component displayName) @NotNull ObjectiveMockregisterNewObjective(@NotNull String name, @NotNull org.bukkit.scoreboard.Criteria criteria, @Nullable net.kyori.adventure.text.Component displayName, @NotNull org.bukkit.scoreboard.RenderType renderType) @NotNull org.bukkit.scoreboard.TeamregisterNewTeam(@NotNull String name) voidresetScores(@NotNull String entry) voidresetScores(@NotNull 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.protected voidunregister(@NotNull TeamMock teamMock) Removes a team from this scoreboard.
-
Constructor Details
-
ScoreboardMock
public ScoreboardMock()
-
-
Method Details
-
registerNewObjective
@Deprecated(since="1.13") @NotNull public @NotNull ObjectiveMock registerNewObjective(@NotNull @NotNull String name, @NotNull @NotNull String criteria) throws IllegalArgumentException Deprecated.- Specified by:
registerNewObjectivein interfaceorg.bukkit.scoreboard.Scoreboard- Throws:
IllegalArgumentException
-
registerNewObjective
@NotNull public @NotNull ObjectiveMock 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 ObjectiveMock 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
@NotNull public @NotNull ObjectiveMock registerNewObjective(@NotNull @NotNull String name, @NotNull @NotNull org.bukkit.scoreboard.Criteria criteria, @Nullable @Nullable net.kyori.adventure.text.Component displayName) throws IllegalArgumentException - Specified by:
registerNewObjectivein interfaceorg.bukkit.scoreboard.Scoreboard- Throws:
IllegalArgumentException
-
registerNewObjective
@NotNull public @NotNull ObjectiveMock registerNewObjective(@NotNull @NotNull String name, @NotNull @NotNull org.bukkit.scoreboard.Criteria 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(since="1.16") @NotNull public @NotNull ObjectiveMock registerNewObjective(@NotNull @NotNull String name, @NotNull @NotNull String criteria, @NotNull @NotNull String displayName) throws IllegalArgumentException Deprecated.- Specified by:
registerNewObjectivein interfaceorg.bukkit.scoreboard.Scoreboard- Throws:
IllegalArgumentException
-
registerNewObjective
@Deprecated(since="1.16") @NotNull public @NotNull ObjectiveMock registerNewObjective(@NotNull @NotNull String name, @NotNull @NotNull String criteria, @NotNull @NotNull String displayName, @NotNull @NotNull org.bukkit.scoreboard.RenderType renderType) throws IllegalArgumentException Deprecated.- Specified by:
registerNewObjectivein interfaceorg.bukkit.scoreboard.Scoreboard- Throws:
IllegalArgumentException
-
registerNewObjective
@NotNull public @NotNull ObjectiveMock registerNewObjective(@NotNull @NotNull String name, @NotNull @NotNull org.bukkit.scoreboard.Criteria criteria, @NotNull @NotNull String displayName) throws IllegalArgumentException - Specified by:
registerNewObjectivein interfaceorg.bukkit.scoreboard.Scoreboard- Throws:
IllegalArgumentException
-
registerNewObjective
@NotNull public @NotNull ObjectiveMock registerNewObjective(@NotNull @NotNull String name, @NotNull @NotNull org.bukkit.scoreboard.Criteria criteria, @NotNull @NotNull String displayName, @NotNull @NotNull org.bukkit.scoreboard.RenderType renderType) throws IllegalArgumentException - Specified by:
registerNewObjectivein interfaceorg.bukkit.scoreboard.Scoreboard- Throws:
IllegalArgumentException
-
getObjective
- Specified by:
getObjectivein interfaceorg.bukkit.scoreboard.Scoreboard- Throws:
IllegalArgumentException
-
getObjectivesByCriteria
@NotNull public @NotNull Set<org.bukkit.scoreboard.Objective> getObjectivesByCriteria(@NotNull @NotNull String criteria) throws IllegalArgumentException - Specified by:
getObjectivesByCriteriain interfaceorg.bukkit.scoreboard.Scoreboard- Throws:
IllegalArgumentException
-
getObjectivesByCriteria
@NotNull public @NotNull Set<org.bukkit.scoreboard.Objective> getObjectivesByCriteria(@NotNull @NotNull org.bukkit.scoreboard.Criteria criteria) throws IllegalArgumentException - Specified by:
getObjectivesByCriteriain interfaceorg.bukkit.scoreboard.Scoreboard- Throws:
IllegalArgumentException
-
getObjectives
- Specified by:
getObjectivesin interfaceorg.bukkit.scoreboard.Scoreboard
-
getObjective
public ObjectiveMock getObjective(@NotNull @NotNull org.bukkit.scoreboard.DisplaySlot slot) throws IllegalArgumentException - Specified by:
getObjectivein interfaceorg.bukkit.scoreboard.Scoreboard- Throws:
IllegalArgumentException
-
getScores
@NotNull public @NotNull Set<org.bukkit.scoreboard.Score> getScores(@NotNull @NotNull org.bukkit.OfflinePlayer player) throws IllegalArgumentException - Specified by:
getScoresin interfaceorg.bukkit.scoreboard.Scoreboard- Throws:
IllegalArgumentException
-
getScores
@NotNull public @NotNull Set<org.bukkit.scoreboard.Score> getScores(@NotNull @NotNull String entry) throws IllegalArgumentException - Specified by:
getScoresin interfaceorg.bukkit.scoreboard.Scoreboard- Throws:
IllegalArgumentException
-
resetScores
public void resetScores(@NotNull @NotNull org.bukkit.OfflinePlayer player) throws IllegalArgumentException - 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(@NotNull @NotNull org.bukkit.OfflinePlayer player) throws IllegalArgumentException - Specified by:
getPlayerTeamin interfaceorg.bukkit.scoreboard.Scoreboard- Throws:
IllegalArgumentException
-
getEntryTeam
public org.bukkit.scoreboard.Team getEntryTeam(@NotNull @NotNull String entry) throws IllegalArgumentException - Specified by:
getEntryTeamin interfaceorg.bukkit.scoreboard.Scoreboard- Throws:
IllegalArgumentException
-
getTeam
public org.bukkit.scoreboard.Team getTeam(@NotNull @NotNull String teamName) throws IllegalArgumentException - Specified by:
getTeamin interfaceorg.bukkit.scoreboard.Scoreboard- Throws:
IllegalArgumentException
-
getTeams
- Specified by:
getTeamsin interfaceorg.bukkit.scoreboard.Scoreboard
-
registerNewTeam
@NotNull public @NotNull org.bukkit.scoreboard.Team registerNewTeam(@NotNull @NotNull String name) throws IllegalArgumentException - 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
public void clearSlot(@NotNull @NotNull org.bukkit.scoreboard.DisplaySlot slot) throws IllegalArgumentException - 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.
-
unregister
Removes a team from this scoreboard.- Parameters:
teamMock- The team to remove.
-