Class ScoreMock
java.lang.Object
be.seeseemelk.mockbukkit.scoreboard.ScoreMock
- All Implemented Interfaces:
Score
Mock implementation of a
Score.-
Constructor Summary
ConstructorsConstructorDescriptionScoreMock(ObjectiveMock objective, String entry) Constructs a newScoreMockfor the provided objective with the specified entry. -
Method Summary
Modifier and TypeMethodDescription@Nullable net.kyori.adventure.text.ComponentvoidcustomName(@Nullable net.kyori.adventure.text.Component customName) @NotNull StringgetEntry()@NotNull ObjectiveMock@NotNull OfflinePlayerDeprecated.intgetScore()booleanboolean@Nullable NumberFormatvoidnumberFormat(@Nullable NumberFormat numberFormat) voidvoidsetPlayer(OfflinePlayer player) Sets the player that this score is tracking.voidsetScore(int score) voidsetTriggerable(boolean triggerable)
-
Constructor Details
-
ScoreMock
Constructs a newScoreMockfor the provided objective with the specified entry.- Parameters:
objective- The objective.entry- The entry.
-
-
Method Details
-
setPlayer
Sets the player that this score is tracking.- Parameters:
player- The player to track.
-
getPlayer
Deprecated. -
getEntry
-
getObjective
- Specified by:
getObjectivein interfaceScore
-
getScore
- Specified by:
getScorein interfaceScore- Throws:
IllegalStateException
-
setScore
- Specified by:
setScorein interfaceScore- Throws:
IllegalStateException
-
isScoreSet
- Specified by:
isScoreSetin interfaceScore- Throws:
IllegalStateException
-
getScoreboard
- Specified by:
getScoreboardin interfaceScore
-
resetScore
- Specified by:
resetScorein interfaceScore- Throws:
IllegalStateException
-
isTriggerable
public boolean isTriggerable()- Specified by:
isTriggerablein interfaceScore
-
setTriggerable
public void setTriggerable(boolean triggerable) - Specified by:
setTriggerablein interfaceScore
-
customName
@Nullable public @Nullable net.kyori.adventure.text.Component customName()- Specified by:
customNamein interfaceScore
-
customName
public void customName(@Nullable @Nullable net.kyori.adventure.text.Component customName) - Specified by:
customNamein interfaceScore
-
numberFormat
- Specified by:
numberFormatin interfaceScore
-
numberFormat
- Specified by:
numberFormatin interfaceScore
-