Enum Class ChatChannel

java.lang.Object
java.lang.Enum<ChatChannel>
dev.itsharshxd.zentrix.api.chat.ChatChannel
All Implemented Interfaces:
Serializable, Comparable<ChatChannel>, Constable

public enum ChatChannel extends Enum<ChatChannel>
Represents the available chat channels for players.

Players can switch between chat channels to communicate with different groups:

  • GLOBAL - All players can see messages
  • TEAM - Only teammates in the same game can see messages
  • PARTY - Only party members can see messages

Since:
1.2.0
  • Enum Constant Details

    • GLOBAL

      public static final ChatChannel GLOBAL
      Global chat channel. Messages are visible to all players.
    • TEAM

      public static final ChatChannel TEAM
      Team chat channel. Messages are visible only to teammates in the same game.
    • PARTY

      public static final ChatChannel PARTY
      Party chat channel. Messages are visible only to party members.
  • Method Details

    • values

      public static ChatChannel[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ChatChannel valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • getId

      public String getId()
      Gets the string identifier for this channel.
      Returns:
      The channel ID (e.g., "global", "team", "party")
    • fromId

      public static ChatChannel fromId(String id)
      Gets a ChatChannel by its ID (case-insensitive).
      Parameters:
      id - The channel ID
      Returns:
      The ChatChannel, or GLOBAL if not found or null