Class ScoreMock

java.lang.Object
be.seeseemelk.mockbukkit.scoreboard.ScoreMock
All Implemented Interfaces:
org.bukkit.scoreboard.Score

public class ScoreMock extends Object implements org.bukkit.scoreboard.Score
Mock implementation of a Score.
  • Constructor Details

    • ScoreMock

      public ScoreMock(ObjectiveMock objective, String entry)
      Constructs a new ScoreMock for the provided objective with the specified entry.
      Parameters:
      objective - The objective.
      entry - The entry.
  • Method Details

    • setPlayer

      public void setPlayer(org.bukkit.OfflinePlayer player)
      Sets the player that this score is tracking.
      Parameters:
      player - The player to track.
    • getPlayer

      @Deprecated(since="1.7.10") @NotNull public @NotNull org.bukkit.OfflinePlayer getPlayer()
      Deprecated.
      Specified by:
      getPlayer in interface org.bukkit.scoreboard.Score
    • getEntry

      @NotNull public @NotNull String getEntry()
      Specified by:
      getEntry in interface org.bukkit.scoreboard.Score
    • getObjective

      @NotNull public @NotNull ObjectiveMock getObjective()
      Specified by:
      getObjective in interface org.bukkit.scoreboard.Score
    • getScore

      public int getScore() throws IllegalStateException
      Specified by:
      getScore in interface org.bukkit.scoreboard.Score
      Throws:
      IllegalStateException
    • setScore

      public void setScore(int score) throws IllegalStateException
      Specified by:
      setScore in interface org.bukkit.scoreboard.Score
      Throws:
      IllegalStateException
    • isScoreSet

      public boolean isScoreSet() throws IllegalStateException
      Specified by:
      isScoreSet in interface org.bukkit.scoreboard.Score
      Throws:
      IllegalStateException
    • getScoreboard

      public org.bukkit.scoreboard.Scoreboard getScoreboard()
      Specified by:
      getScoreboard in interface org.bukkit.scoreboard.Score
    • resetScore

      public void resetScore() throws IllegalStateException
      Specified by:
      resetScore in interface org.bukkit.scoreboard.Score
      Throws:
      IllegalStateException
    • isTriggerable

      public boolean isTriggerable()
      Specified by:
      isTriggerable in interface org.bukkit.scoreboard.Score
    • setTriggerable

      public void setTriggerable(boolean triggerable)
      Specified by:
      setTriggerable in interface org.bukkit.scoreboard.Score
    • customName

      @Nullable public @Nullable net.kyori.adventure.text.Component customName()
      Specified by:
      customName in interface org.bukkit.scoreboard.Score
    • customName

      public void customName(@Nullable @Nullable net.kyori.adventure.text.Component customName)
      Specified by:
      customName in interface org.bukkit.scoreboard.Score
    • numberFormat

      @Nullable public @Nullable io.papermc.paper.scoreboard.numbers.NumberFormat numberFormat()
      Specified by:
      numberFormat in interface org.bukkit.scoreboard.Score
    • numberFormat

      public void numberFormat(@Nullable @Nullable io.papermc.paper.scoreboard.numbers.NumberFormat numberFormat)
      Specified by:
      numberFormat in interface org.bukkit.scoreboard.Score