> For the complete documentation index, see [llms.txt](https://edseries-plugins.gitbook.io/p/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://edseries-plugins.gitbook.io/p/edperks/extra/action-types.md).

# Action Types

GUI items run **actions** when clicked, and the menu can run an action on close. An action is a string beginning with `[type]` optionally followed by arguments:

```yaml
left-click-actions:
  - '[menu] perk-index'
  - '[sound] UI_BUTTON_CLICK'
```

Multiple actions can be a YAML list, or a single `;`-separated string. Each click variant (`left-click-actions`, `right-click-actions`, `shift-left-click-actions`, `shift-right-click-actions`) has its own list, with `any-click-actions` as a fallback when no specific variant is set.

All actions support `{player}` and `{uuid}` placeholders, plus any PlaceholderAPI placeholder.

***

## Generic actions

### `[command] <command>`

Runs the command **as the player**.

```yaml
- '[command] spawn'
```

### `[console] <command>`

Runs the command **from console**. Supports `{player}` and `{uuid}`.

```yaml
- '[console] give {player} diamond 1'
```

### `[message] <text>`

Sends a chat message to the player (colour codes + placeholders supported).

```yaml
- '[message] &dPurchase tickets at &fstore.myserver.com'
```

### `[broadcast] <text>`

Broadcasts a message to the whole server. Supports `{player}`.

```yaml
- '[broadcast] &e{player} just rolled a perk!'
```

### `[title] <title> <subtitle> [fadeIn] [stay] [fadeOut]`

Shows a title/subtitle. Timing args (in ticks) are optional and default to `10 70 20`.

```yaml
- '[title] &dLucky! &7You rolled a perk 10 60 10'
```

### `[sound] <sound> [volume] [pitch]`

Plays a sound at the player. `<sound>` is a Bukkit sound name.

```yaml
- '[sound] ENTITY_PLAYER_LEVELUP 1 1'
```

### `[menu] <gui> [key value ...]`

Opens another EdPerks menu, optionally passing placeholder pairs.

```yaml
- '[menu] perk-index'
```

### `[close]`

Closes the menu for the player.

```yaml
- '[close]'
```

### `[permission] <permission> <actionIfHas> [actionIfNot]`

Runs one action or another depending on whether the player has a permission. The branch values are themselves actions (quote them carefully).

```yaml
- '[permission] edperks.vip [message] &aVIP perk! [message] &cVIPs only'
```

***

## EdPerks-specific actions

### `[roll]`

Performs a perk roll on the player's held tool — the core action of the Tool Perks menu's roll button. Validates tool + tickets, plays the animation and applies the result. Only works inside the Tool Perks menu.

```yaml
- '[roll]'
```

### `[return]`

Opens the **active host's home menu** (where the perks menu was reached from). On EdDungeons that's its sword/enchant menu; on EdTools it's the menu set by `hooks.edtools.return-gui` (or the held tool's own menu). Used by the Tool Perks menu's `on-close-action`.

```yaml
on-close-action: '[return]'
```

### `[buy-tickets] <amount> <cost> <currency>`

Charges the player `<cost>` of the host `<currency>` and, on success, grants `<amount>` Perk Tickets. On failure they get the `tickets.not-enough-currency` message.

```yaml
- '[buy-tickets] 5 10000 money'
```

See [Perk Tickets](/p/edperks/essential/tickets.md#selling-tickets-for-in-game-currency).

***

{% hint style="info" %}
Unknown action types are ignored and logged to console. If an action "does nothing", check the `[type]` spelling and that the dependency it needs (a host for `[buy-tickets]`, PlaceholderAPI for placeholders) is installed.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://edseries-plugins.gitbook.io/p/edperks/extra/action-types.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
