# Action Types

Actions run when a player clicks a hologram or one of its lines. They run in order, top to bottom. Each one is written as the type in brackets, then its arguments separated by `;`.

## Action Types

| Action Type | Description |
| ----------- | ----------- |
| \[MESSAGE] | Send a message to the player |
| \[COMMAND] | Run a command as the player or the console |
| \[SERVER] | Send the player to another server on the proxy |
| \[PAGE] | Turn the hologram to another page for the player |
| \[SOUND] | Play a sound to the player |
| \[ACTION\_BAR] | Show a message in the action bar |
| \[TITLE] | Show a title and subtitle |
| \[DELAY] | Wait before running the next actions |
| \[TELEPORT] | Teleport the player to a location |
| \[PERMISSION] | Stop the actions below for players without a permission |
| \[CONDITION] | Stop the actions below for players who fail a placeholder check |
| \[RANDOM] | Run one of several actions at random |

## Message

MiniMessage works as well as color codes.

* **Syntax:** `[MESSAGE] <message>`
* **Example:** `[MESSAGE] &aYou clicked the hologram.`

## Command

Without `console` or `player` in front, the player runs the command.

* **Syntax:** `[COMMAND] <console|player>; <command>`
* **Example:** `[COMMAND] console; give %player% diamond 1`

## Server

Uses the BungeeCord plugin channel, so the proxy has to accept it. The server name is the one in the proxy's config.

* **Syntax:** `[SERVER] <server>`
* **Example:** `[SERVER] survival`

## Page

`next` and `previous` wrap around from the last page to the first and back.

* **Syntax:** `[PAGE] <next|previous|first|last|number>`
* **Example:** `[PAGE] next`

## Sound

The sound is a Bukkit sound name such as `ENTITY_PLAYER_LEVELUP`, or a key such as `minecraft:block.note_block.pling` for resource pack sounds.

* **Syntax:** `[SOUND] <sound>; <volume>; <pitch>`
* **Example:** `[SOUND] ENTITY_EXPERIENCE_ORB_PICKUP; 1; 1`

## Action Bar

* **Syntax:** `[ACTION_BAR] <message>`
* **Example:** `[ACTION_BAR] &ePage turned.`

## Title

Fade in, stay and fade out are in ticks.

* **Syntax:** `[TITLE] <title>; <subtitle>; <fadein>; <stay>; <fadeout>`
* **Example:** `[TITLE] &6Welcome; &7to the server; 10; 40; 10`

## Delay

Waits that many seconds before the actions below it run.

* **Syntax:** `[DELAY] <seconds>`
* **Example:** `[DELAY] 1.5`

## Teleport

Leave out the world to stay in the player's world, and the yaw and pitch to keep where they look. Placeholders work. The action builder can fill it from a spot you pick.

* **Syntax:** `[TELEPORT] <world>,<x>,<y>,<z>[,<yaw>,<pitch>]`
* **Example:** `[TELEPORT] world,0.5,64,0.5,180,0`

## Permission

A player without the permission is sent the message, or the hologram's no-permission message when it is left out, and the actions below it do not run.

* **Syntax:** `[PERMISSION] <permission>; [message]`
* **Example:** `[PERMISSION] server.vip; &cThis is for VIPs only.`

## Condition

Compares a placeholder with a value the same way as [line conditions](../main-features/pages-and-lines/line-conditions.md). The check is a condition type such as `GREATER_OR_EQUAL`, or `>=`, `<=`, `>`, `<`, `==`, `!=`, `contains`. `PERMISSION` and `NO_PERMISSION` take a permission instead of a placeholder and no value. When it fails, the message is sent if there is one and the actions below it do not run.

* **Syntax:** `[CONDITION] <placeholder>; <check>; <value>; [message]`
* **Example:** `[CONDITION] %player_level%; >=; 10; &cYou need level 10.`

## Random

Picks one of the actions split by `||` and runs it, then carries on with the actions below. A random action inside a random action works up to 8 levels deep.

* **Syntax:** `[RANDOM] <action> || <action> || ...`
* **Example:** `[RANDOM] [MESSAGE] &aHeads! || [MESSAGE] &cTails!`

## Currency Actions

With PhoenixCurrencies installed, three more types sell, reward or check for any of its currencies. A take or require the player cannot afford stops the actions after it, so put it before the reward.

* **Syntax:** `[CURRENCY_GIVE] <currency> <amount>`, `[CURRENCY_TAKE] <currency> <amount>`, `[CURRENCY_REQUIRE] <currency> <amount>`
* **Example:** `[CURRENCY_TAKE] gems 50`

See the PhoenixCurrencies page [NPCs & Holograms](../../phoenix-currencies/features/npcs-and-holograms.md). Other plugins can add types of their own through the [API](../api/README.md#custom-actions).

Source: https://www.phoenixplugins.com/docs/phoenix-holograms/plugin-information/action-types