Class ObjectiveMock
java.lang.Object
be.seeseemelk.mockbukkit.scoreboard.ObjectiveMock
- All Implemented Interfaces:
Objective
-
Constructor Summary
ConstructorsConstructorDescriptionObjectiveMock(@NotNull ScoreboardMock scoreboard, @NotNull String name, @NotNull String displayName, @NotNull String criteria, @NotNull RenderType renderType) -
Method Summary
Modifier and TypeMethodDescription@NotNull net.kyori.adventure.text.ComponentvoiddisplayName(@Nullable net.kyori.adventure.text.Component displayName) @NotNull String@NotNull StringDeprecated.@NotNull StringgetName()@NotNull RenderType@NotNull ScoreMock@NotNull ScoreMockgetScore(@NotNull OfflinePlayer player) Deprecated.@NotNull ScoregetScoreFor(@NotNull Entity entity) @NotNull CriteriabooleanbooleanChecks if the objective is still registered.voidsetDisplayName(@NotNull String displayName) Deprecated.voidsetDisplaySlot(@Nullable DisplaySlot slot) voidsetRenderType(@NotNull RenderType renderType) void
-
Constructor Details
-
ObjectiveMock
public ObjectiveMock(@NotNull @NotNull ScoreboardMock scoreboard, @NotNull @NotNull String name, @NotNull @NotNull String displayName, @NotNull @NotNull String criteria, @NotNull @NotNull RenderType renderType)
-
-
Method Details
-
getName
- Specified by:
getNamein interfaceObjective- Throws:
IllegalStateException
-
displayName
@NotNull public @NotNull net.kyori.adventure.text.Component displayName() throws IllegalStateException- Specified by:
displayNamein interfaceObjective- Throws:
IllegalStateException
-
displayName
public void displayName(@Nullable @Nullable net.kyori.adventure.text.Component displayName) throws IllegalStateException, IllegalArgumentException - Specified by:
displayNamein interfaceObjective- Throws:
IllegalStateExceptionIllegalArgumentException
-
getDisplayName
Deprecated.- Specified by:
getDisplayNamein interfaceObjective- Throws:
IllegalStateException
-
setDisplayName
@Deprecated public void setDisplayName(@NotNull @NotNull String displayName) throws IllegalStateException, IllegalArgumentException Deprecated.- Specified by:
setDisplayNamein interfaceObjective- Throws:
IllegalStateExceptionIllegalArgumentException
-
getCriteria
- Specified by:
getCriteriain interfaceObjective- Throws:
IllegalStateException
-
getTrackedCriteria
- Specified by:
getTrackedCriteriain interfaceObjective- Throws:
IllegalStateException
-
getScoreboard
- Specified by:
getScoreboardin interfaceObjective
-
unregister
- Specified by:
unregisterin interfaceObjective- Throws:
IllegalStateException
-
isRegistered
public boolean isRegistered()Checks if the objective is still registered.- Returns:
trueif the objective is still registered,falseif it has been unregistered.
-
setDisplaySlot
- Specified by:
setDisplaySlotin interfaceObjective- Throws:
IllegalStateException
-
getDisplaySlot
- Specified by:
getDisplaySlotin interfaceObjective- Throws:
IllegalStateException
-
setRenderType
- Specified by:
setRenderTypein interfaceObjective- Throws:
IllegalStateException
-
getRenderType
- Specified by:
getRenderTypein interfaceObjective- Throws:
IllegalStateException
-
getScore
@Deprecated @NotNull public @NotNull ScoreMock getScore(@NotNull @NotNull OfflinePlayer player) throws IllegalArgumentException, IllegalStateException Deprecated.- Specified by:
getScorein interfaceObjective- Throws:
IllegalArgumentExceptionIllegalStateException
-
getScore
@NotNull public @NotNull ScoreMock getScore(@NotNull @NotNull String entry) throws IllegalArgumentException, IllegalStateException - Specified by:
getScorein interfaceObjective- Throws:
IllegalArgumentExceptionIllegalStateException
-
getScoreFor
@NotNull public @NotNull Score getScoreFor(@NotNull @NotNull Entity entity) throws IllegalArgumentException, IllegalStateException - Specified by:
getScoreForin interfaceObjective- Throws:
IllegalArgumentExceptionIllegalStateException
-
isModifiable
- Specified by:
isModifiablein interfaceObjective- Throws:
IllegalStateException
-