Enum Team

java.lang.Object
java.lang.Enum<Team>
de.marcely.bedwars.api.arena.Team
All Implemented Interfaces:
Serializable, Comparable<Team>, java.lang.constant.Constable

public enum Team extends Enum<Team>
A list of all possible colors that exist in the game
  • Enum Constant Details

    • YELLOW

      public static final Team YELLOW
    • ORANGE

      public static final Team ORANGE
    • RED

      public static final Team RED
    • BLUE

      public static final Team BLUE
    • LIGHT_BLUE

      public static final Team LIGHT_BLUE
    • CYAN

      public static final Team CYAN
    • LIGHT_GREEN

      public static final Team LIGHT_GREEN
    • GREEN

      public static final Team GREEN
    • PURPLE

      public static final Team PURPLE
    • PINK

      public static final Team PINK
    • WHITE

      public static final Team WHITE
    • LIGHT_GRAY

      public static final Team LIGHT_GRAY
    • GRAY

      public static final Team GRAY
    • BROWN

      public static final Team BROWN
    • BLACK

      public static final Team BLACK
  • Method Details

    • values

      public static Team[] 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

      public static Team valueOf(String name)
      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 name
      NullPointerException - 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

      public DyeColor getDyeColor()
      Returns the corresponding DyeColor to this team.
      Returns:
      The DyeColor of the team
    • setDyeColor

      public void setDyeColor(DyeColor dyeColor)
      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

      public Color getBukkitColor()
      Returns the corresponding Color to this team.
      Returns:
      The color of the team
    • setBukkitColor

      public void setBukkitColor(Color color)
      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

      public String getInitials()
      Returns the first letters of the team in english.

      Examples:
      When RED: R
      When LIGHT_BLUE: LB
      When CYAN: C

      Returns:
      The initials of the team
    • getDisplayName

      public String getDisplayName()
      You can find them in the messages file under: "Color_[team]"
      Returns:
      The configured name of the team in the default language
    • getDisplayName

      public String getDisplayName(@Nullable @Nullable CommandSender sender)
      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

      public Message 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

      public ItemStack 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

      public ItemStack newItemInstance(@Nullable @Nullable CommandSender sender)
      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

      @Nullable public static @Nullable Team getByName(String name)
      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