Enum ClickEvent.Action

    • Enum Constant Detail

      • OPEN_URL

        public static final ClickEvent.Action OPEN_URL
        Opens a url when clicked.
        Since:
        4.0.0
      • OPEN_FILE

        public static final ClickEvent.Action OPEN_FILE
        Opens a file when clicked.

        This action is not readable, and may only be used locally on the client.

        Since:
        4.0.0
      • RUN_COMMAND

        public static final ClickEvent.Action RUN_COMMAND
        Runs a command when clicked.
        Since:
        4.0.0
      • SUGGEST_COMMAND

        public static final ClickEvent.Action SUGGEST_COMMAND
        Suggests a command into the chat box.
        Since:
        4.0.0
      • CHANGE_PAGE

        public static final ClickEvent.Action CHANGE_PAGE
        Changes the page of a book.
        Since:
        4.0.0
      • COPY_TO_CLIPBOARD

        public static final ClickEvent.Action COPY_TO_CLIPBOARD
        Copies text to the clipboard.
        Since:
        4.0.0
        Since Minecraft:
        1.15
    • Method Detail

      • values

        public static ClickEvent.Action[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (ClickEvent.Action c : ClickEvent.Action.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

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

        public boolean readable()
        Tests if this action is readable.
        Returns:
        true if this action is readable, false if this action is not readable
        Since:
        4.0.0