Package me.croabeast.takion.chat
Enum Class ChatComponent.Click
- All Implemented Interfaces:
Serializable,Comparable<ChatComponent.Click>,java.lang.constant.Constable
- Enclosing interface:
ChatComponent<C extends ChatComponent<C>>
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionChanges the page in a book interface (e.g.Copies the specified text to the player's clipboard.Executes the given command as if the player typed it.Opens a local file path on the player's system.Opens the specified URL in the player's default web browser.Suggests the given command in the chat input bar. -
Method Summary
Modifier and TypeMethodDescriptionnet.md_5.bungee.api.chat.ClickEvent.ActionasBukkit()Get the underlying BungeeCord click‐action enum.static ChatComponent.ClickParse a case‐insensitive alias or enum name into aChatComponent.Clickconstant.toString()Returns the primary alias (the first registered name) for this action.static ChatComponent.ClickReturns the enum constant of this class with the specified name.static ChatComponent.Click[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
EXECUTE
Executes the given command as if the player typed it. -
OPEN_URL
Opens the specified URL in the player's default web browser. -
OPEN_FILE
Opens a local file path on the player's system. -
SUGGEST
Suggests the given command in the chat input bar. -
CHANGE_PAGE
Changes the page in a book interface (e.g. written book GUI). -
CLIPBOARD
Copies the specified text to the player's clipboard.
-
-
Method Details
-
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
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 nameNullPointerException- 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.Actioncorresponding to this constant
-
toString
Returns the primary alias (the first registered name) for this action.- Overrides:
toStringin classEnum<ChatComponent.Click>- Returns:
- the primary alias string
-
fromName
Parse a case‐insensitive alias or enum name into aChatComponent.Clickconstant.Returns
SUGGESTif the input is blank or unrecognized.- Parameters:
name- the alias or enum name to parse- Returns:
- the matching
ChatComponent.Clickconstant, orSUGGESTif none found
-