Page cover

🖱️Click Actions

Crown utilizes a powerful Click Action system. These actions allow you to define exactly what happens when a player interacts with an item in a GUI (menus, profiles, reports, etc.) or when a system hook (like a warning expiration) triggers.

You can assign these actions to left_click_actions, right_click_actions, shift_left_click_actions, or within hooks in punishment configuration files.

📝 Syntax Format

Most actions follow this format: ACTION_NAME:Argument1:Argument2


Actions used to move between menus or change pages.

Action
Syntax
Description

OPEN_MENU

OPEN_MENU:<menu_key>

Opens a specific menu. Keys: punish_menu, history_menu, time_selector, ban_details, mute_details, profile_menu, full_inventory_menu, enderchest_menu.

CLOSE_MENU

CLOSE_MENU

Simply closes the currently open inventory.

ADJUST_PAGE

ADJUST_PAGE:<next_page/previous_page>

Used in paginated menus (History, Reports, Locker) to switch pages.

OPEN_AUDIT_LOG

OPEN_AUDIT_LOG

Opens the Operator Audit Log book for the current target.

OPEN_PROFILE...

OPEN_PROFILE_TARGET OPEN_PROFILE_REQUESTER OPEN_PROFILE_MODERATOR

Opens the profile GUI for the specific user context (used in Report Details).


⚖️ Punishment Logic

Actions specific to setting up and executing punishments within the GUI.

Action
Syntax
Description

CONFIRM_PUNISHMENT

CONFIRM_PUNISHMENT

Executes the punishment currently configured in the Details Menu (Ban, Mute, etc.).

TOGGLE_PUNISH_METHOD

TOGGLE_PUNISH_METHOD

Toggles the punishment method between IP and Local (User).

REQUEST_INPUT

REQUEST_INPUT:<type>

Closes the menu and asks the player to type in chat. Types: reason_input, custom_time_input, change_target.

SET_PUNISHMENT_TYPE

SET_PUNISHMENT_TYPE:confirm_time SET_PUNISHMENT_TYPE:permanent_time

Used inside the Time Selector menu to apply the selected time or set it to permanent.

ADJUST_TIME

ADJUST_TIME:<key>

Adds/Subtracts time in the Time Selector. Keys: plus_1_day, minus_1_hour, etc.

UN_...

UN_BAN, UN_MUTE, UN_SOFTBAN, etc.

Removes the specific active punishment from the target.


📢 Visuals & Audio

Actions to send feedback to players, targets, or staff.

Action
Syntax
Description

PLAY_SOUND

PLAY_SOUND:<sound>:<volume>:<pitch>

Plays a Bukkit sound to the player clicking the item.

PLAY_SOUND_TARGET

PLAY_SOUND_TARGET:<sound>:<vol>:<pitch>

Plays a sound to the target player (if online).

PLAY_SOUND_MODS

PLAY_SOUND_MODS:<sound>:<vol>:<pitch>

Plays a sound to all online staff with the crown.fchat permission.

MESSAGE

MESSAGE:<text>

Sends a chat message to the player clicking the item. Supports placeholders.

MESSAGE_TARGET

MESSAGE_TARGET:<text>

Sends a chat message to the target player.

MESSAGE_MODS

MESSAGE_MODS:<text>

Sends a message to all online staff and the console.

TITLE

TITLE:<title>:<subtitle>:<sec>

Sends a screen title to the player.

TITLE_TARGET

TITLE_TARGET:<title>:<subtitle>:<sec>

Sends a screen title to the target player.

ACTIONBAR

ACTIONBAR:<text>

Sends a message above the hotbar to the player.

ACTIONBAR_TARGET

ACTIONBAR_TARGET:<text>

Sends an actionbar message to the target player.

GIVE_EFFECT_TARGET

GIVE_EFFECT_TARGET:<type>:<sec>:<amp>

Applies a potion effect to the target (e.g., BLINDNESS:10:1).


⚙️ Commands & Automation

Actions to run commands or automate warnings.

triangle-exclamation
Action
Syntax
Description

CONSOLE_COMMAND

CONSOLE_COMMAND:<command>

Runs a command from the server console. Placeholders like {target} and {player} work here.

PLAYER_COMMAND

PLAYER_COMMAND:<command>

Forces the player clicking the item to run a command.

PLAYER_COMMAND_OP

PLAYER_COMMAND_OP:<command>

Temporarily Ops the player, runs the command, and de-ops them.

APPLY_...

APPLY_BAN:<time>:<reason>[:ip/local] APPLY_MUTE, APPLY_SOFTBAN, APPLY_KICK

Hook Exclusive: Used in warn.yml to automatically punish a player when they reach a certain warn level.


📋 Report System

Actions specific to the /reports GUI.

Action
Syntax
Description

OPEN_REPORT_DETAILS

OPEN_REPORT_DETAILS

Opens the detailed view of the clicked report entry.

ASSIGN_MODERATOR

ASSIGN_MODERATOR

Prompts to assign a specific staff member to a report.

SET_REPORT_STATUS...

SET_REPORT_STATUS_RESOLVED _REJECTED, _TAKE, _PENDING

Changes the status of the current report.

FILTER_REPORTS...

FILTER_REPORTS_STATUS _TYPE, _NAME

Cycles filters in the main reports menu.

FILTER_MY_REPORTS

FILTER_MY_REPORTS

Toggles showing only reports assigned to the viewer.


🎒 Inventory Management

Actions for managing player inventories and lockers.

Action
Syntax
Description

REQUEST_CLEAR...

REQUEST_CLEAR_FULL_INVENTORY REQUEST_CLEAR_ENDER_CHEST REQUEST_CLEAR_LOCKER

Initiates the "Click again to confirm" state to wipe the specific inventory.

Last updated