Class Objective

java.lang.Object
org.geysermc.geyser.scoreboard.Objective

public final class Objective extends Object
  • Constructor Details

    • Objective

      public Objective(Scoreboard scoreboard, String objectiveName)
      /!\ This method is made for temporary objectives until the real objective is received
      Parameters:
      scoreboard - the scoreboard
      objectiveName - the name of the objective
    • Objective

      public Objective(Scoreboard scoreboard, String objectiveName, com.github.steveice10.mc.protocol.data.game.scoreboard.ScoreboardPosition displaySlot, String displayName, int type)
  • Method Details

    • registerScore

      public void registerScore(String id, int score)
    • setScore

      public void setScore(String id, int score)
    • removeScore

      public void removeScore(String id)
    • removeScore0

      public void removeScore0(String id)
      Used internally to remove a score from the score map
    • setDisplayName

      public Objective setDisplayName(String displayName)
    • setType

      public Objective setType(int type)
    • setActive

      public void setActive(com.github.steveice10.mc.protocol.data.game.scoreboard.ScoreboardPosition displaySlot)
    • pendingRemove

      public void pendingRemove()
      The objective will be removed on the next update
    • getTeamColor

      public com.github.steveice10.mc.protocol.data.game.scoreboard.TeamColor getTeamColor()
    • removed

      public void removed()
    • getScoreboard

      public Scoreboard getScoreboard()
    • getId

      public long getId()
    • isActive

      public boolean isActive()
    • getUpdateType

      public UpdateType getUpdateType()
    • getObjectiveName

      public String getObjectiveName()
    • getDisplaySlot

      public com.github.steveice10.mc.protocol.data.game.scoreboard.ScoreboardPosition getDisplaySlot()
    • getDisplaySlotName

      public String getDisplaySlotName()
    • getDisplayName

      public String getDisplayName()
    • getType

      public int getType()
    • getScores

      public Map<String,​Score> getScores()
    • setUpdateType

      public void setUpdateType(UpdateType updateType)