# Click Actions

&#x20;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`

***

### 📂 Navigation & Interfaces

Actions used to move between menus or change pages.

<table><thead><tr><th width="172">Action</th><th width="334">Syntax</th><th>Description</th></tr></thead><tbody><tr><td><strong>OPEN_MENU</strong></td><td><code>OPEN_MENU:&#x3C;menu_key></code></td><td>Opens a specific menu.<br><strong>Keys:</strong> <code>punish_menu</code>, <code>history_menu</code>, <code>time_selector</code>, <code>ban_details</code>, <code>mute_details</code>, <code>profile_menu</code>, <code>full_inventory_menu</code>, <code>enderchest_menu</code>.</td></tr><tr><td><strong>CLOSE_MENU</strong></td><td><code>CLOSE_MENU</code></td><td>Simply closes the currently open inventory.</td></tr><tr><td><strong>ADJUST_PAGE</strong></td><td><code>ADJUST_PAGE:&#x3C;next_page/previous_page></code></td><td>Used in paginated menus (History, Reports, Locker) to switch pages.</td></tr><tr><td><strong>OPEN_AUDIT_LOG</strong></td><td><code>OPEN_AUDIT_LOG</code></td><td>Opens the Operator Audit Log book for the current target.</td></tr><tr><td><strong>OPEN_PROFILE...</strong></td><td><code>OPEN_PROFILE_TARGET</code><br><code>OPEN_PROFILE_REQUESTER</code><br><code>OPEN_PROFILE_MODERATOR</code></td><td>Opens the profile GUI for the specific user context (used in Report Details).</td></tr></tbody></table>

***

### ⚖️ Punishment Logic

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

<table><thead><tr><th width="242">Action</th><th>Syntax</th><th>Description</th></tr></thead><tbody><tr><td><strong>CONFIRM_PUNISHMENT</strong></td><td><code>CONFIRM_PUNISHMENT</code></td><td>Executes the punishment currently configured in the Details Menu (Ban, Mute, etc.).</td></tr><tr><td><strong>TOGGLE_PUNISH_METHOD</strong></td><td><code>TOGGLE_PUNISH_METHOD</code></td><td>Toggles the punishment method between <strong>IP</strong> and <strong>Local</strong> (User).</td></tr><tr><td><strong>REQUEST_INPUT</strong></td><td><code>REQUEST_INPUT:&#x3C;type></code></td><td>Closes the menu and asks the player to type in chat.<br><strong>Types:</strong> <code>reason_input</code>, <code>custom_time_input</code>, <code>change_target</code>.</td></tr><tr><td><strong>SET_PUNISHMENT_TYPE</strong></td><td><code>SET_PUNISHMENT_TYPE:confirm_time</code><br><code>SET_PUNISHMENT_TYPE:permanent_time</code></td><td>Used inside the Time Selector menu to apply the selected time or set it to permanent.</td></tr><tr><td><strong>ADJUST_TIME</strong></td><td><code>ADJUST_TIME:&#x3C;key></code></td><td>Adds/Subtracts time in the Time Selector.<br><strong>Keys:</strong> <code>plus_1_day</code>, <code>minus_1_hour</code>, etc.</td></tr><tr><td><strong>UN_...</strong></td><td><code>UN_BAN</code>, <code>UN_MUTE</code>, <code>UN_SOFTBAN</code>, etc.</td><td>Removes the specific active punishment from the target.</td></tr></tbody></table>

***

### 📢 Visuals & Audio

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

<table><thead><tr><th width="205">Action</th><th width="351">Syntax</th><th>Description</th></tr></thead><tbody><tr><td><strong>PLAY_SOUND</strong></td><td><code>PLAY_SOUND:&#x3C;sound>:&#x3C;volume>:&#x3C;pitch></code></td><td>Plays a Bukkit sound to the player clicking the item.</td></tr><tr><td><strong>PLAY_SOUND_TARGET</strong></td><td><code>PLAY_SOUND_TARGET:&#x3C;sound>:&#x3C;vol>:&#x3C;pitch></code></td><td>Plays a sound to the <strong>target</strong> player (if online).</td></tr><tr><td><strong>PLAY_SOUND_MODS</strong></td><td><code>PLAY_SOUND_MODS:&#x3C;sound>:&#x3C;vol>:&#x3C;pitch></code></td><td>Plays a sound to all online staff with the <code>crown.fchat</code> permission.</td></tr><tr><td><strong>MESSAGE</strong></td><td><code>MESSAGE:&#x3C;text></code></td><td>Sends a chat message to the player clicking the item. Supports placeholders.</td></tr><tr><td><strong>MESSAGE_TARGET</strong></td><td><code>MESSAGE_TARGET:&#x3C;text></code></td><td>Sends a chat message to the <strong>target</strong> player.</td></tr><tr><td><strong>MESSAGE_MODS</strong></td><td><code>MESSAGE_MODS:&#x3C;text></code></td><td>Sends a message to all online staff and the console.</td></tr><tr><td><strong>TITLE</strong></td><td><code>TITLE:&#x3C;title>:&#x3C;subtitle>:&#x3C;sec></code></td><td>Sends a screen title to the player.</td></tr><tr><td><strong>TITLE_TARGET</strong></td><td><code>TITLE_TARGET:&#x3C;title>:&#x3C;subtitle>:&#x3C;sec></code></td><td>Sends a screen title to the <strong>target</strong> player.</td></tr><tr><td><strong>ACTIONBAR</strong></td><td><code>ACTIONBAR:&#x3C;text></code></td><td>Sends a message above the hotbar to the player.</td></tr><tr><td><strong>ACTIONBAR_TARGET</strong></td><td><code>ACTIONBAR_TARGET:&#x3C;text></code></td><td>Sends an actionbar message to the <strong>target</strong> player.</td></tr><tr><td><strong>GIVE_EFFECT_TARGET</strong></td><td><code>GIVE_EFFECT_TARGET:&#x3C;type>:&#x3C;sec>:&#x3C;amp></code></td><td>Applies a potion effect to the target (e.g., <code>BLINDNESS:10:1</code>).</td></tr></tbody></table>

***

### ⚙️ Commands & Automation

Actions to run commands or automate warnings.

{% hint style="danger" %}
**Note:** These are powerful. `PLAYER_COMMAND_OP` should be used with extreme caution.
{% endhint %}

| 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\_...**          | <p><code>APPLY\_BAN:\<time>:\<reason>\[:ip/local]</code><br><code>APPLY\_MUTE</code>, <code>APPLY\_SOFTBAN</code>, <code>APPLY\_KICK</code></p> | **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.

<table><thead><tr><th width="219">Action</th><th>Syntax</th><th>Description</th></tr></thead><tbody><tr><td><strong>OPEN_REPORT_DETAILS</strong></td><td><code>OPEN_REPORT_DETAILS</code></td><td>Opens the detailed view of the clicked report entry.</td></tr><tr><td><strong>ASSIGN_MODERATOR</strong></td><td><code>ASSIGN_MODERATOR</code></td><td>Prompts to assign a specific staff member to a report.</td></tr><tr><td><strong>SET_REPORT_STATUS...</strong></td><td><code>SET_REPORT_STATUS_RESOLVED</code><br><code>_REJECTED</code>, <code>_TAKE</code>, <code>_PENDING</code></td><td>Changes the status of the current report.</td></tr><tr><td><strong>FILTER_REPORTS...</strong></td><td><code>FILTER_REPORTS_STATUS</code><br><code>_TYPE</code>, <code>_NAME</code></td><td>Cycles filters in the main reports menu.</td></tr><tr><td><strong>FILTER_MY_REPORTS</strong></td><td><code>FILTER_MY_REPORTS</code></td><td>Toggles showing only reports assigned to the viewer.</td></tr></tbody></table>

***

### 🎒 Inventory Management

Actions for managing player inventories and lockers.

<table><thead><tr><th width="179">Action</th><th>Syntax</th><th>Description</th></tr></thead><tbody><tr><td><strong>REQUEST_CLEAR...</strong></td><td><code>REQUEST_CLEAR_FULL_INVENTORY</code><br><code>REQUEST_CLEAR_ENDER_CHEST</code><br><code>REQUEST_CLEAR_LOCKER</code></td><td>Initiates the "Click again to confirm" state to wipe the specific inventory.</td></tr></tbody></table>
