public enum ClickAction extends Enum<ClickAction>
Each type has a corresponding ClickEvent.Action from the Bukkit API
and a list of names that can be used to identify it.
| Enum Constant and Description |
|---|
CHANGE_PAGE
A click action that changes the page of a book.
|
CLIPBOARD
A click action that copies a text to the player's clipboard.
|
OPEN_FILE
A click action that opens a file on the player's computer.
|
OPEN_URL
A click action that opens a URL in the player's browser.
|
RUN_CMD
A click action that runs a command as the player who clicked.
|
SUGGEST_CMD
A click action that suggests a command in the player's chat input.
|
| Modifier and Type | Method and Description |
|---|---|
net.md_5.bungee.api.chat.ClickEvent.Action |
asBukkit()
Returns the Bukkit click action associated with this click type.
|
static ClickAction |
fromString(String name)
Returns the ClickAction that corresponds to the specified name, or
SUGGEST_CMD
if the name is blank or not recognized. |
String |
toString()
Returns the first name associated with this click type.
|
static ClickAction |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ClickAction[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ClickAction RUN_CMD
public static final ClickAction OPEN_URL
public static final ClickAction OPEN_FILE
public static final ClickAction SUGGEST_CMD
public static final ClickAction CHANGE_PAGE
public static final ClickAction CLIPBOARD
public static ClickAction[] values()
for (ClickAction c : ClickAction.values()) System.out.println(c);
public static ClickAction valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic net.md_5.bungee.api.chat.ClickEvent.Action asBukkit()
public String toString()
toString in class Enum<ClickAction>public static ClickAction fromString(String name)
SUGGEST_CMD
if the name is blank or not recognized.name - the name of the ClickAction to retrieveCopyright © 2023. All rights reserved.