Enum Class ChatComponent.Click

java.lang.Object
java.lang.Enum<ChatComponent.Click>
me.croabeast.takion.chat.ChatComponent.Click
All Implemented Interfaces:
Serializable, Comparable<ChatComponent.Click>, java.lang.constant.Constable
Enclosing interface:
ChatComponent<C extends ChatComponent<C>>

public static enum ChatComponent.Click extends Enum<ChatComponent.Click>
Supported click‐action types for ChatComponent.setClick(Click, String).

Each constant maps a set of aliases (including the enum name itself) to a BungeeCord ClickEvent.Action. Use fromName(String) to parse an alias into its constant.

  • Enum Constant Details

    • EXECUTE

      public static final ChatComponent.Click EXECUTE
      Executes the given command as if the player typed it.
    • OPEN_URL

      public static final ChatComponent.Click OPEN_URL
      Opens the specified URL in the player's default web browser.
    • OPEN_FILE

      public static final ChatComponent.Click OPEN_FILE
      Opens a local file path on the player's system.
    • SUGGEST

      public static final ChatComponent.Click SUGGEST
      Suggests the given command in the chat input bar.
    • CHANGE_PAGE

      public static final ChatComponent.Click CHANGE_PAGE
      Changes the page in a book interface (e.g. written book GUI).
    • CLIPBOARD

      public static final ChatComponent.Click CLIPBOARD
      Copies the specified text to the player's clipboard.
  • Method Details

    • values

      public static ChatComponent.Click[] 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 ChatComponent.Click 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
    • asBukkit

      public net.md_5.bungee.api.chat.ClickEvent.Action asBukkit()
      Get the underlying BungeeCord click‐action enum.
      Returns:
      the ClickEvent.Action corresponding to this constant
    • toString

      public String toString()
      Returns the primary alias (the first registered name) for this action.
      Overrides:
      toString in class Enum<ChatComponent.Click>
      Returns:
      the primary alias string
    • fromName

      public static ChatComponent.Click fromName(String name)
      Parse a case‐insensitive alias or enum name into a ChatComponent.Click constant.

      Returns SUGGEST if the input is blank or unrecognized.

      Parameters:
      name - the alias or enum name to parse
      Returns:
      the matching ChatComponent.Click constant, or SUGGEST if none found