# 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](https://gstudios.gitbook.io/gslibrary/color-api/colors-in-configurations).&#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](https://gstudios.gitbook.io/gslibrary/color-api/colors-in-configurations).&#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](https://gstudios.gitbook.io/gslibrary/color-api/colors-in-configurations).&#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](https://gstudios.gitbook.io/gslibrary/color-api/colors-in-configurations).&#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](https://gstudios.gitbook.io/gslibrary/color-api/colors-in-configurations).&#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](https://gstudios.gitbook.io/gslibrary/color-api/colors-in-configurations).&#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](https://gstudios.gitbook.io/gslibrary/color-api/colors-in-configurations).&#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](https://gstudios.gitbook.io/gslibrary/color-api/colors-in-configurations).&#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 %}


---

# Agent Instructions: 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://gstudios.gitbook.io/gslibrary/actions-api/actions-list.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.
