> For the complete documentation index, see [llms.txt](https://gstudios.gitbook.io/gslibrary/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gstudios.gitbook.io/gslibrary/actions-api/actions-list.md).

# Actions list

{% hint style="info" %}
Actions in this list are actions that each of our plugins has. Each plugin may also have its own actions, which are separated on its wiki page.
{% endhint %}

### - Message action

Sends a message to the player who performed the action.\
Support for PlaceholderAPI, \<center> and [colors](/gslibrary/color-api/colors-in-configurations.md).&#x20;

> type: message

{% code title="SINGLE LINE" overflow="wrap" lineNumbers="true" %}

```yaml
actions:
  message1:
    type: message
    value: '&aHELLO!'
```

{% endcode %}

{% code title="MULTIPLE LINES" overflow="wrap" lineNumbers="true" %}

```yaml
actions:
  message1:
    type: message
    values:
      - '<center>&aHELLO!'
      - '&aHELLO!'
```

{% endcode %}

### - Broadcast action

Sends a broadcast to all online players.\
Support for PlaceholderAPI, \<center> and [colors](/gslibrary/color-api/colors-in-configurations.md).&#x20;

> type: broadcast

{% code title="SINGLE LINE" overflow="wrap" lineNumbers="true" %}

```yaml
actions:
  broadcast1:
    type: broadcast
    value: '&aHELLO!'
```

{% endcode %}

{% code title="MULTIPLE LINES" overflow="wrap" lineNumbers="true" %}

```yaml
actions:
  broadcast1:
    type: broadcast
    values:
      - '<center>&aHELLO!'
      - '&aHELLO!'
```

{% endcode %}

### - Player command action

Dispatch a command by player who called the action.\
Support for PlaceholderAPI and [colors](/gslibrary/color-api/colors-in-configurations.md).&#x20;

> type: player-cmd

{% code title="SINGLE LINE" overflow="wrap" lineNumbers="true" %}

```yaml
actions:
  playercommand1:
    type: player-cmd
    value: 'say hello'
```

{% endcode %}

{% code title="MULTIPLE LINES" overflow="wrap" lineNumbers="true" %}

```yaml
actions:
  playercommand1:
    type: player-cmd
    values:
      - 'say hello'
      - 'say GSLibrary is best'
```

{% endcode %}

### - Console command action

Dispatch a command from a console. Use placeholder %player% to get a player who called the action.\
Support for PlaceholderAPI and [colors](/gslibrary/color-api/colors-in-configurations.md).&#x20;

> use placeholder: %player%
>
> type: console-cmd

{% code title="SINGLE LINE" overflow="wrap" lineNumbers="true" %}

```yaml
actions:
  consolecommand1:
    type: console-cmd
    value: 'say hello %player%'
```

{% endcode %}

{% code title="MULTIPLE LINES" overflow="wrap" lineNumbers="true" %}

```yaml
actions:
  consolecommand1:
    type: console-cmd
    values:
      - 'say hello %player%'
      - 'say %player% is best'
```

{% endcode %}

### - Bungee connect action

Connect a player who called the action to specific server.\
Support for PlaceholderAPI.

> type: connect

{% code title="EXAMPLE" overflow="wrap" lineNumbers="true" %}

```yaml
actions:
  survival:
    type: connect
    value: 'survival'
```

{% endcode %}

### - Inventory close action

Close a inventory for player who called the action.

> type: close-inv

{% code title="EXAMPLE" overflow="wrap" lineNumbers="true" %}

```yaml
actions:
  close:
    type: close-inv
```

{% endcode %}

### - GUI open action

Opens a gui from any of our plugins.

> type: open-gui

{% code title="EXAMPLE" overflow="wrap" lineNumbers="true" %}

```yaml
actions:
  menu:
    type: open-gui
    value: 'gui_name'
```

{% endcode %}

### - GUI back action

Opens the player's previous menu.

> type: gui-back

{% code title="EXAMPLE" overflow="wrap" lineNumbers="true" %}

```yaml
actions:
  back:
    type: gui-back
```

{% endcode %}

### - GUI forward action

Opens the player's upcoming menu.

> type: gui-forward&#x20;

{% code title="EXAMPLE" overflow="wrap" lineNumbers="true" %}

```yaml
actions:
  forward:
    type: gui-forward 
```

{% endcode %}

### - Actionbar action

Sends a actionbar message to a player who called the action.\
Support for PlaceholderAPI and [colors](/gslibrary/color-api/colors-in-configurations.md).&#x20;

> type: actionbar&#x20;

{% code title="EXAMPLE" overflow="wrap" lineNumbers="true" %}

```yaml
actions:
  actionbar1:
    type: actionbar
    value: '&cHello!'
```

{% endcode %}

### - Actionbar for all players action

Sends a actionbar message to all online players.\
Support for PlaceholderAPI and [colors](/gslibrary/color-api/colors-in-configurations.md).&#x20;

> type: actionbar-all&#x20;

{% code title="EXAMPLE" overflow="wrap" lineNumbers="true" %}

```yaml
actions:
  actionbar1:
    type: actionbar-all
    value: '&cHello!'
```

{% endcode %}

### - Title action

Sends a title message to a player who called the action.\
Support for PlaceholderAPI and [colors](/gslibrary/color-api/colors-in-configurations.md).&#x20;

> type: title

{% code title="EXAMPLE" overflow="wrap" lineNumbers="true" %}

```yaml
actions:
  title1:
    type: title
    title: '&cHello!'
    subtitle: '&4world!'
    fade-in: 20
    stay: 60
    fade-out: 20
```

{% endcode %}

### - Title for all players action

Sends a title message to all online players.\
Support for PlaceholderAPI and [colors](/gslibrary/color-api/colors-in-configurations.md).&#x20;

> type: title-all

{% code title="EXAMPLE" overflow="wrap" lineNumbers="true" %}

```yaml
actions:
  title1:
    type: title-all
    title: '&cHello!'
    subtitle: '&4world!'
    fade-in: 20
    stay: 60
    fade-out: 20
```

{% endcode %}

### - Sound action

Play a sound to a player who called the action.\
All sound type can be found [`here`](https://github.com/CryptoMorin/XSeries/blob/master/src/main/java/com/cryptomorin/xseries/XSound.java)!

> type: sound

{% code title="EXAMPLE" overflow="wrap" lineNumbers="true" %}

```yaml
actions:
  sound1:
    type: sound
    value: 'ENTITY_VILLAGER_NO'
    volume: 10
    pitch: 1
```

{% endcode %}

### - Sound for all players action

Play a sound to all online players.\
All sound type can be found [`here`](https://github.com/CryptoMorin/XSeries/blob/master/src/main/java/com/cryptomorin/xseries/XSound.java)!

> type: sound-all

{% code title="EXAMPLE" overflow="wrap" lineNumbers="true" %}

```yaml
actions:
  sound1:
    type: sound-all
    value: 'ENTITY_VILLAGER_NO'
    volume: 10
    pitch: 1
```

{% endcode %}

### - Gamemode action

Change a gamemode for a player who called the action.\
Gamemode types: <mark style="color:blue;">**SURVIVAL**</mark><mark style="color:blue;">,</mark> <mark style="color:blue;"></mark><mark style="color:blue;">**CREATIVE**</mark><mark style="color:blue;">,</mark> <mark style="color:blue;"></mark><mark style="color:blue;">**SPECTATOR**</mark><mark style="color:blue;">,</mark> <mark style="color:blue;"></mark><mark style="color:blue;">**ADVENTURE**</mark>

> type: gamemode

{% code title="EXAMPLE" overflow="wrap" lineNumbers="true" %}

```yaml
actions:
  gamemode1:
    type: gamemode
    value: 'CREATIVE'
```

{% endcode %}

### - Fly toggle action

Toggle fly to on/off for a player who called the action.

> type: fly-toggle

{% code title="EXAMPLE" overflow="wrap" lineNumbers="true" %}

```yaml
actions:
  fly1:
    type: fly-toggle
```

{% endcode %}

### - Fly enabled/disabled action

Set fly to on/off for a player who called the action.

> type: fly-enabled
>
> type: fly-disabled

{% code title="EXAMPLE" overflow="wrap" lineNumbers="true" %}

```yaml
actions:
  fly1:
    type: fly-enabled
```

{% endcode %}
