Corøna's Studios
  • 👑Corøna's Plugins Documentation
  • CrownPunishments
    • 🎯Overview
    • 👮Permissions
  • ⌨️Commands
  • 📍Placeholders
  • 🖼️Items and Menus
    • 🖱️ClickActions
    • ⚔️Item Syntaxis
    • 💬Messages and Formatting
  • 📖Punishment Types
    • ❌Ban
    • 💻SoftBan
    • 🔇Mute
    • ⚠️Warn
    • 🥾Kick
    • 🧊Freeze
Powered by GitBook
On this page
  1. Items and Menus

ClickActions

Click Actions define what happens when a player interacts with a menu item (left-click or right-click). Actions are configured in the menu YAML files.

Here's a list of all available Click Actions and their syntax:

ClickAction
Syntax
Description

OPEN_MENU

OPEN_MENU:<menu_key>

Opens another menu (e.g., OPEN_MENU:time_selector, OPEN_MENU:punish_menu). <menu_key> corresponds to the menu identifier (e.g., time_selector, punish_details).

SET_PUNISHMENT_TYPE

SET_PUNISHMENT_TYPE:<punishment_type_key>

Sets a specific punishment type (e.g., SET_PUNISHMENT_TYPE:permanent_time, SET_PUNISHMENT_TYPE:confirm_time). <punishment_type_key> is the identifier for the punishment type or action.

REQUEST_INPUT

REQUEST_INPUT:<input_type>

Requests text input from the player via chat (e.g., REQUEST_INPUT:reason_input, REQUEST_INPUT:custom_time_input). <input_type> is the type of input being requested (e.g., reason_input).

ADJUST_TIME

ADJUST_TIME:<time_adjustment_key>

Adjusts the selected time duration in the Time Selector Menu (e.g., ADJUST_TIME:plus_15_min, ADJUST_TIME:minus_2_hour). <time_adjustment_key> is the identifier for the time adjustment.

CONFIRM_PUNISHMENT

CONFIRM_PUNISHMENT:

Confirms and executes the punishment set in the Punish Details Menu.

UN_SOFTBAN

UN_SOFTBAN:

Removes the softban from the target player.

UN_FREEZE

UN_FREEZE:

Removes the freeze punishment from the target player.

UN_BAN

UN_BAN:

Removes the ban from the target player.

UN_MUTE

UN_MUTE:

Removes the mute from the target player.

UN_WARN

UN_WARN:

Removes the warn from the target player (if unwarn_command is configured).

CLOSE_MENU

CLOSE_MENU:

Closes the currently open menu.

ADJUST_PAGE

ADJUST_PAGE:<next_page|previous_page|no_action>

Navigates between pages in the History Menu (e.g., ADJUST_PAGE:next_page, ADJUST_PAGE:previous_page, ADJUST_PAGE:no_action).

CONSOLE_COMMAND

CONSOLE_COMMAND:<command>

Executes a command as the server console. <command> is the command to execute, supporting placeholders.

PLAYER_COMMAND

PLAYER_COMMAND:<command>

Executes a command as the player who clicked the item. <command> is the command to execute, supporting placeholders.

PLAYER_COMMAND_OP

PLAYER_COMMAND_OP:<command>

Executes a command as OP by the player who clicked the item. <command> is the command to execute, supporting placeholders.

PLAY_SOUND

PLAY_SOUND:<sound_name>:<volume>:<pitch>

PLAY_SOUND_TARGET

PLAY_SOUND_TARGET:<sound_name>:<volume>:<pitch>

PLAY_SOUND_MODS

PLAY_SOUND_MODS:<sound_name>:<volume>:<pitch>

TITLE

TITLE:<title>:<subtitle>:<time_seconds>:<fade_in_ticks>:<fade_out_ticks>

Shows a title to the player who clicked the item. <title> and <subtitle> are text strings, <time_seconds> is display duration, <fade_in_ticks> and <fade_out_ticks> are fade in/out durations.

TITLE_TARGET

TITLE_TARGET:<title>:<subtitle>:<time_seconds>:<fade_in_ticks>:<fade_out_ticks>

Shows a title to the target player. Parameters are the same as TITLE.

TITLE_MODS

TITLE_MODS:<title>:<subtitle>:<time_seconds>:<fade_in_ticks>:<fade_out_ticks>

Shows a title to mods (players with crown.mod permission). Parameters are the same as TITLE.

MESSAGE

MESSAGE:<message>

Sends a message to the player who clicked the item. <message> is the message text.

MESSAGE_TARGET

MESSAGE_TARGET:<message>

Sends a message to the target player. <message> is the message text.

MESSAGE_MODS

MESSAGE_MODS:<message>

Sends a message to mods (players with crown.mod permission). <message> is the message text.

ACTIONBAR

ACTIONBAR:<text>

Sends an actionbar text to the player who clicked the item. <text> is the actionbar text.

ACTIONBAR_TARGET

ACTIONBAR_TARGET:<text>

Sends an actionbar text to the target player. <text> is the actionbar text.

ACTIONBAR_MODS

ACTIONBAR_MODS:<text>

Sends an actionbar text to mods (players with crown.mod permission). <text> is the actionbar text.

GIVE_EFFECT_TARGET

GIVE_EFFECT_TARGET:<effect_type>:<duration_seconds>:<amplifier>:<show_particles(optional)>

Gives a potion effect to the target player. <effect_type> is the PotionEffectType name (namespaced key, e.g., minecraft:slowness), <duration_seconds> and <amplifier> are integers, <show_particles> is optional boolean (default true).

NO_ACTION

NO_ACTION:

Performs no action. Useful for placeholder items or disabling click functionality.

PreviousItems and MenusNextItem Syntaxis

Last updated 25 days ago

Plays a sound to the player who clicked the item. <sound_name> is the name, <volume> and <pitch> are optional volume and pitch values (default 1.0).

Plays a sound to the target player (player being punished). Parameters are the same as PLAY_SOUND.

Plays a sound to mods (players with crown.mod permission). Parameters are the same as PLAY_SOUND.

🖼️
🖱️
Bukkit Sound enum
Bukkit Sound enum
Bukkit Sound enum