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 ConstantDescription -
Field Summary
-
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.Get the formatted name of the team as it is present in the configs.Get the name of the team in the default language.getDisplayName
(@Nullable CommandSender sender) Get the name of the team in the language of the CommandSender.Returns the corresponding DyeColor to this team.@Nullable String
Returns the enforced initials of the team that shall be shown to players.Returns the initials of the team that shall be shown to players.Get the original Message instance that is used for the name of the team.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
setConfigName
(String configName) Set the formatted name of the team as it is present in the configs.void
setDyeColor
(DyeColor dyeColor) Set the corresponding DyeColor of this team.void
setEnforcedInitials
(@Nullable String initials) Set the initials of the team that shall be shown to players.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
-
-
Field Details
-
VALUES
-
-
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
-
getBungeeChatColor
public net.md_5.bungee.api.ChatColor getBungeeChatColor()Returns the corresponding ChatColor to this team.- Returns:
- The ChatColor of the team
-
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 initials of the team that shall be shown to players.In case none has been enforced using
setEnforcedInitials(String)
, it will return the default initials. Default initials are automatically generated based on the team's name. Examples of auto generation:
WhenRED
: R
WhenLIGHT_BLUE
: LB
WhenCYAN
: C- Returns:
- The initials of the team
-
setEnforcedInitials
Set the initials of the team that shall be shown to players.In case a non-null value is given, the auto generation of initials will be disabled and
getInitials()
will return the given value.- Parameters:
initials
- The new enforced initials. May benull
to reset to auto generation- See Also:
-
getEnforcedInitials
Returns the enforced initials of the team that shall be shown to players.In case none has been enforced using
setEnforcedInitials(String)
, it will returnnull
.- Returns:
- The enforced initials of the team. May be
null
- See Also:
-
getDisplayName
Get the name of the team in the default language.- Returns:
- The configured name of the team in the default language
-
getDisplayName
Get the name of the team in the language of the CommandSender.- 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
Get the original Message instance that is used for the name of the team.- Returns:
- The Message instance fed with the message entry from the messages files
-
setConfigName
Set the formatted name of the team as it is present in the configs.- Parameters:
configName
- The new raw name
-
getConfigName
Get the formatted name of the team as it is present in the configs.- Returns:
- The raw name
-
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
-