Package dev.jorel.commandapi.wrappers
Enum Class ScoreboardSlot
- All Implemented Interfaces:
Serializable,Comparable<ScoreboardSlot>,Constable,net.kyori.adventure.key.Keyed,org.bukkit.Keyed
A representation of scoreboard display slots, as well as team colors for the
sidebar
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.scoreboard.DisplaySlotGets the display slot of this scoreboard slot.org.bukkit.NamespacedKeygetKey()org.bukkit.ChatColorGets the team color of this scoreboard slot.booleanReturns whether this scoreboard slot has a team color.static ScoreboardSlotof(org.bukkit.scoreboard.DisplaySlot slot) Constructs a ScoreboardSlot from a DisplaySlotstatic ScoreboardSlotofMinecraft(int i) Determines the scoreboard slot value based on an internal Minecraft integerstatic ScoreboardSlotofTeamColor(org.bukkit.ChatColor color) Constructs a ScoreboardSlot from a ChatColortoString()Returns the Minecraft string representation of this scoreboard slotstatic ScoreboardSlotReturns the enum constant of this class with the specified name.static ScoreboardSlot[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOfMethods inherited from interface org.bukkit.Keyed
key
-
Enum Constant Details
-
PLAYER_LIST
-
SIDEBAR
-
LEGACY_BELOW_NAME
-
BELOW_NAME
-
SIDEBAR_TEAM_BLACK
-
SIDEBAR_TEAM_DARK_BLUE
-
SIDEBAR_TEAM_DARK_GREEN
-
SIDEBAR_TEAM_DARK_AQUA
-
SIDEBAR_TEAM_DARK_RED
-
SIDEBAR_TEAM_DARK_PURPLE
-
SIDEBAR_TEAM_GOLD
-
SIDEBAR_TEAM_GRAY
-
SIDEBAR_TEAM_DARK_GRAY
-
SIDEBAR_TEAM_BLUE
-
SIDEBAR_TEAM_GREEN
-
SIDEBAR_TEAM_AQUA
-
SIDEBAR_TEAM_RED
-
SIDEBAR_TEAM_LIGHT_PURPLE
-
SIDEBAR_TEAM_YELLOW
-
SIDEBAR_TEAM_WHITE
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
ofMinecraft
Determines the scoreboard slot value based on an internal Minecraft integer- Parameters:
i- the scoreboard slot value
-
of
Constructs a ScoreboardSlot from a DisplaySlot- Parameters:
slot- the display slot to convert into a ScoreboardSlot- Returns:
- a ScoreboardSlot from the provided DisplaySlot
-
ofTeamColor
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:
getKeyin interfaceorg.bukkit.Keyed
-
toString
Returns the Minecraft string representation of this scoreboard slot- Overrides:
toStringin classEnum<ScoreboardSlot>- Returns:
- the Minecraft string representation of this scoreboard slot
-