Package de.marcely.bedwars.api.arena
Enum Team
- All Implemented Interfaces:
Serializable
,Comparable<Team>
,java.lang.constant.Constable
-
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 TypeMethodDescriptionReturns the corresponding Color to this team.net.md_5.bungee.api.ChatColor
Returns the corresponding ChatColor to this team.static @Nullable Team
Looks through all teams and checks which team fits the best to the given name.Deprecated.You can find them in the messages file under: "Color_[team]"getDisplayName
(@Nullable CommandSender sender) You can find them in the messages file under: "Color_[team]".Returns the corresponding DyeColor to this team.Returns the first letters of the team in english.Uses the key from the messages file and uses that to build the Message instance.Constructs a new item that's being used for placing the bed during the set-up.newItemInstance
(@Nullable CommandSender sender) Constructs a new item that's being used for placing the bed during the set-up.void
setBukkitColor
(Color color) Set the corresponding Color of this team.void
setBungeeChatColor
(net.md_5.bungee.api.ChatColor chatColor) Set the corresponding ChatColor of this team.void
setChatColor
(ChatColor chatColor) Deprecated.void
setDyeColor
(DyeColor dyeColor) Set the corresponding DyeColor of this team.static Team
Returns the enum constant of this type with the specified name.static Team[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
YELLOW
-
ORANGE
-
RED
-
BLUE
-
LIGHT_BLUE
-
CYAN
-
LIGHT_GREEN
-
GREEN
-
PURPLE
-
PINK
-
WHITE
-
LIGHT_GRAY
-
GRAY
-
BROWN
-
BLACK
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
getChatColor
Deprecated.Returns the corresponding ChatColor to this team.- Returns:
- The ChatColor of the team
-
getBungeeChatColor
public net.md_5.bungee.api.ChatColor getBungeeChatColor()Returns the corresponding ChatColor to this team.- Returns:
- The ChatColor of the team
-
setChatColor
Deprecated.Set the corresponding ChatColor of this team.This change is not persistent and will change back after a restart.
- Parameters:
chatColor
- The new color
-
setBungeeChatColor
public void setBungeeChatColor(net.md_5.bungee.api.ChatColor chatColor) Set the corresponding ChatColor of this team.This change is not persistent and will change back after a restart.
- Parameters:
chatColor
- The new color
-
getDyeColor
Returns the corresponding DyeColor to this team.- Returns:
- The DyeColor of the team
-
setDyeColor
Set the corresponding DyeColor of this team.This change is not persistent and will change back after a restart.
- Parameters:
dyeColor
- The new color
-
getBukkitColor
Returns the corresponding Color to this team.- Returns:
- The color of the team
-
setBukkitColor
Set the corresponding Color of this team.This change is not persistent and will change back after a restart.
- Parameters:
color
- The new color
-
getInitials
Returns the first letters of the team in english.Examples:
WhenRED
: R
WhenLIGHT_BLUE
: LB
WhenCYAN
: C- Returns:
- The initials of the team
-
getDisplayName
You can find them in the messages file under: "Color_[team]"- Returns:
- The configured name of the team in the default language
-
getDisplayName
You can find them in the messages file under: "Color_[team]".Uses the configured language as the default language.
- Parameters:
sender
- The person from which it should look up the language. Null if it should take the default language- Returns:
- The configured name of the team in the language of the CommandSender
-
getNameAsMessage
Uses the key from the messages file and uses that to build the Message instance.You can find them in the messages file under: "Color_[team]".
- Returns:
- The Message instance fed with the message entry from the messages files
-
newItemInstance
Constructs a new item that's being used for placing the bed during the set-up.Uses the configured language for the name of the item.
- Returns:
- The item that's being used for set-up
-
newItemInstance
Constructs a new item that's being used for placing the bed during the set-up.The name of the item is being translated into the language of the given sender. Passing
null
causes it to use the default configured language instead.- Parameters:
sender
- Will name the item in the langauge of him- Returns:
- The item that's being used for set-up
-
getByName
Looks through all teams and checks which team fits the best to the given name.Ignores upper- and undercase, and some other things for better results.
- Parameters:
name
- The name of the team it should look up for- Returns:
- The team that fits the best to the name. Returns null if it hasn't found any
-
getBungeeChatColor()