Class DisplaySlot

java.lang.Object
org.geysermc.geyser.scoreboard.display.slot.DisplaySlot
Direct Known Subclasses:
BelownameDisplaySlot, PlayerlistDisplaySlot, SidebarDisplaySlot

public abstract class DisplaySlot extends Object
  • Field Details

    • session

      protected final GeyserSession session
    • objective

      protected final Objective objective
    • objectiveId

      protected final String objectiveId
      Use this instead of objective name because one objective can be shared in multiple slots, but each slot has its own logic and might not contain all scores
    • slot

      protected final org.geysermc.mcprotocollib.protocol.data.game.scoreboard.ScoreboardPosition slot
    • teamColor

      protected final org.geysermc.mcprotocollib.protocol.data.game.scoreboard.TeamColor teamColor
    • positionName

      protected final String positionName
    • updateType

      protected UpdateType updateType
  • Constructor Details

    • DisplaySlot

      public DisplaySlot(GeyserSession session, Objective objective, org.geysermc.mcprotocollib.protocol.data.game.scoreboard.ScoreboardPosition slot)
  • Method Details

    • render

      public final void render(List<org.cloudburstmc.protocol.bedrock.data.ScoreInfo> addScores, List<org.cloudburstmc.protocol.bedrock.data.ScoreInfo> removeScores)
    • render0

      protected abstract void render0(List<org.cloudburstmc.protocol.bedrock.data.ScoreInfo> addScores, List<org.cloudburstmc.protocol.bedrock.data.ScoreInfo> removeScores)
    • addScore

      public abstract void addScore(ScoreReference reference)
    • playerRegistered

      public abstract void playerRegistered(PlayerEntity player)
    • playerRemoved

      public abstract void playerRemoved(PlayerEntity player)
    • remove

      public void remove()
    • markNeedsUpdate

      public void markNeedsUpdate()
    • sendDisplayObjective

      protected void sendDisplayObjective()
    • sendRemoveObjective

      protected void sendRemoveObjective()
    • objective

      public Objective objective()
    • objectiveId

      public String objectiveId()
    • position

      public org.geysermc.mcprotocollib.protocol.data.game.scoreboard.ScoreboardPosition position()
    • teamColor

      public @Nullable org.geysermc.mcprotocollib.protocol.data.game.scoreboard.TeamColor teamColor()
    • updateType

      public UpdateType updateType()
    • slotCategory

      public static org.geysermc.mcprotocollib.protocol.data.game.scoreboard.ScoreboardPosition slotCategory(org.geysermc.mcprotocollib.protocol.data.game.scoreboard.ScoreboardPosition slot)