CommandAPI 9.6.0
An API for the command UI introduced in Minecraft 1.13
dev.jorel.commandapi.wrappers.ScoreboardSlot Enum Reference

A representation of scoreboard display slots, as well as team colors for the sidebar. More...

+ Inheritance diagram for dev.jorel.commandapi.wrappers.ScoreboardSlot:

Public Member Functions

 ScoreboardSlot (String key, int internal)
 
 ScoreboardSlot (String key, int internal, ChatColor color)
 
DisplaySlot getDisplaySlot ()
 Gets the display slot of this scoreboard slot. More...
 
ChatColor getTeamColor ()
 Gets the team color of this scoreboard slot. More...
 
boolean hasTeamColor ()
 Returns whether this scoreboard slot has a team color. More...
 
NamespacedKey getKey ()
 
String toString ()
 Returns the Minecraft string representation of this scoreboard slot. More...
 

Static Public Member Functions

static ScoreboardSlot ofMinecraft (int i)
 Determines the scoreboard slot value based on an internal Minecraft integer. More...
 
static ScoreboardSlot of (DisplaySlot slot)
 Constructs a ScoreboardSlot from a DisplaySlot. More...
 
static ScoreboardSlot ofTeamColor (ChatColor color)
 Constructs a ScoreboardSlot from a ChatColor. More...
 

Public Attributes

 PLAYER_LIST =("list", 0x0)
 
 SIDEBAR =("sidebar", 0x1)
 
 LEGACY_BELOW_NAME =("belowName", 0x2)
 
 BELOW_NAME =("below_name", 0x2)
 
 SIDEBAR_TEAM_BLACK =("sidebar.team.black", 0x0, ChatColor.BLACK)
 
 SIDEBAR_TEAM_DARK_BLUE =("sidebar.team.dark_blue", 0x1, ChatColor.DARK_BLUE)
 
 SIDEBAR_TEAM_DARK_GREEN =("sidebar.team.dark_green", 0x2, ChatColor.DARK_GREEN)
 
 SIDEBAR_TEAM_DARK_AQUA =("sidebar.team.dark_aqua", 0x3, ChatColor.DARK_AQUA)
 
 SIDEBAR_TEAM_DARK_RED =("sidebar.team.dark_red", 0x4, ChatColor.DARK_RED)
 
 SIDEBAR_TEAM_DARK_PURPLE =("sidebar.team.dark_purple", 0x5, ChatColor.DARK_PURPLE)
 
 SIDEBAR_TEAM_GOLD =("sidebar.team.gold", 0x6, ChatColor.GOLD)
 
 SIDEBAR_TEAM_GRAY =("sidebar.team.gray", 0x7, ChatColor.GRAY)
 
 SIDEBAR_TEAM_DARK_GRAY =("sidebar.team.dark_gray", 0x8, ChatColor.DARK_GRAY)
 
 SIDEBAR_TEAM_BLUE =("sidebar.team.blue", 0x9, ChatColor.BLUE)
 
 SIDEBAR_TEAM_GREEN =("sidebar.team.green", 0xA, ChatColor.GREEN)
 
 SIDEBAR_TEAM_AQUA =("sidebar.team.aqua", 0xB, ChatColor.AQUA)
 
 SIDEBAR_TEAM_RED =("sidebar.team.red", 0xC, ChatColor.RED)
 
 SIDEBAR_TEAM_LIGHT_PURPLE =("sidebar.team.light_purple", 0xD, ChatColor.LIGHT_PURPLE)
 
 SIDEBAR_TEAM_YELLOW =("sidebar.team.yellow", 0xE, ChatColor.YELLOW)
 
 SIDEBAR_TEAM_WHITE =("sidebar.team.white", 0xF, ChatColor.WHITE)
 

Detailed Description

A representation of scoreboard display slots, as well as team colors for the sidebar.

Member Function Documentation

◆ getDisplaySlot()

DisplaySlot dev.jorel.commandapi.wrappers.ScoreboardSlot.getDisplaySlot ( )

Gets the display slot of this scoreboard slot.

Returns
this scoreboard slot's display slot

◆ getTeamColor()

ChatColor dev.jorel.commandapi.wrappers.ScoreboardSlot.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()

boolean dev.jorel.commandapi.wrappers.ScoreboardSlot.hasTeamColor ( )

Returns whether this scoreboard slot has a team color.

Returns
true if this scoreboard slot has a team color

◆ of()

static ScoreboardSlot dev.jorel.commandapi.wrappers.ScoreboardSlot.of ( DisplaySlot  slot)
static

Constructs a ScoreboardSlot from a DisplaySlot.

Parameters
slotthe display slot to convert into a ScoreboardSlot
Returns
a ScoreboardSlot from the provided DisplaySlot

◆ ofMinecraft()

static ScoreboardSlot dev.jorel.commandapi.wrappers.ScoreboardSlot.ofMinecraft ( int  i)
static

Determines the scoreboard slot value based on an internal Minecraft integer.

Parameters
ithe scoreboard slot value

◆ ofTeamColor()

static ScoreboardSlot dev.jorel.commandapi.wrappers.ScoreboardSlot.ofTeamColor ( ChatColor  color)
static

Constructs a ScoreboardSlot from a ChatColor.

Parameters
colorthe chat color to convert into a ScoreboardSlot
Returns
a ScoreboardSlot from the provided ChatColor

◆ toString()

String dev.jorel.commandapi.wrappers.ScoreboardSlot.toString ( )

Returns the Minecraft string representation of this scoreboard slot.

Returns
the Minecraft string representation of this scoreboard slot