Enum Class ScoreboardSlot

java.lang.Object
java.lang.Enum<ScoreboardSlot>
dev.jorel.commandapi.wrappers.ScoreboardSlot
All Implemented Interfaces:
Serializable, Comparable<ScoreboardSlot>, Constable, net.kyori.adventure.key.Keyed, org.bukkit.Keyed

public enum ScoreboardSlot extends Enum<ScoreboardSlot> implements org.bukkit.Keyed
A representation of scoreboard display slots, as well as team colors for the sidebar
  • Enum Constant Details

    • PLAYER_LIST

      public static final ScoreboardSlot PLAYER_LIST
    • BELOW_NAME

      public static final ScoreboardSlot BELOW_NAME
  • Method Details

    • values

      public static ScoreboardSlot[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ScoreboardSlot valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • ofMinecraft

      public static ScoreboardSlot ofMinecraft(int i)
      Determines the scoreboard slot value based on an internal Minecraft integer
      Parameters:
      i - the scoreboard slot value
    • of

      public static ScoreboardSlot of(org.bukkit.scoreboard.DisplaySlot slot)
      Constructs a ScoreboardSlot from a DisplaySlot
      Parameters:
      slot - the display slot to convert into a ScoreboardSlot
      Returns:
      a ScoreboardSlot from the provided DisplaySlot
    • ofTeamColor

      public static ScoreboardSlot ofTeamColor(org.bukkit.ChatColor color)
      Constructs a ScoreboardSlot from a ChatColor
      Parameters:
      color - the chat color to convert into a ScoreboardSlot
      Returns:
      a ScoreboardSlot from the provided ChatColor
    • getDisplaySlot

      public org.bukkit.scoreboard.DisplaySlot getDisplaySlot()
      Gets the display slot of this scoreboard slot.
      Returns:
      this scoreboard slot's display slot
    • getTeamColor

      public org.bukkit.ChatColor getTeamColor()
      Gets the team color of this scoreboard slot.
      Returns:
      this scoreboard slot's team color, or null if a team color is not present
    • hasTeamColor

      public boolean hasTeamColor()
      Returns whether this scoreboard slot has a team color.
      Returns:
      true if this scoreboard slot has a team color
    • getKey

      public org.bukkit.NamespacedKey getKey()
      Specified by:
      getKey in interface org.bukkit.Keyed
    • toString

      public String toString()
      Returns the Minecraft string representation of this scoreboard slot
      Overrides:
      toString in class Enum<ScoreboardSlot>
      Returns:
      the Minecraft string representation of this scoreboard slot