Package dev.jorel.commandapi.wrappers
Class ScoreboardSlot
java.lang.Object
dev.jorel.commandapi.wrappers.ScoreboardSlot
A representation of scoreboard display slots, as well as team colors for the sidebar
-
Constructor Summary
ConstructorsConstructorDescriptionScoreboardSlot(int i) Determines the scoreboard slot value based on an internal Minecraft integer -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.scoreboard.DisplaySlotGets the display slot of this scoreboard slot.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 ScoreboardSlotofTeamColor(org.bukkit.ChatColor color) Constructs a ScoreboardSlot from a ChatColortoString()Returns the Minecraft string representation of this scoreboard slot
-
Constructor Details
-
ScoreboardSlot
public ScoreboardSlot(int i) Determines the scoreboard slot value based on an internal Minecraft integer- Parameters:
i- the scoreboard slot value
-
-
Method Details
-
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
-
toString
Returns the Minecraft string representation of this scoreboard slot
-