Class MessageType

java.lang.Object
net.essentialsx.api.v2.services.discord.MessageType

public final class MessageType extends Object
Indicates the type of message being sent and its literal channel name used in the config.
  • Constructor Details

    • MessageType

      public MessageType(String key)
      Creates a MessageType which will send channels to the specified channel key.

      The message type key may only contain: lowercase letters, numbers, and dashes.

      Parameters:
      key - The channel key defined in the message-types section of the config.
  • Method Details

    • getKey

      public String getKey()
      Gets the key used in message-types section of the config.
      Returns:
      The config key.
    • isPlayer

      public boolean isPlayer()
      Checks if this message type should be beholden to player-specific config settings.
      Returns:
      true if message type should be beholden to player-specific config settings.
    • toString

      public String toString()
      Overrides:
      toString in class Object