# Game commands

Game commands are used to allow or disable specific commands while players playing in game.

## Features

* List of player names who can use the commands even if it is disabled
* Bypass permission to allow disabled commands
* List of allowed and disabled commands with multiple argument recognition
* Executor types for game status or player state:
  * `player` - for alive players
  * `spectator` - for spectator players
  * `game-freeze` - game freeze state

## Configuration

```yml
game-commands:
  player:
    exemptions:
    - operator
    bypass-permission: ''
    allowed:
    - /rm leave,stopgame,listplayers,listgames,kick,stop,stats,dailymissions,invite
    - stop;restart;reload
    disabled:
    - '*'

  spectator:
    exemptions:
    - operator
    bypass-permission: ''
    allowed:
    - /rm leave,stopgame
    disabled:
    - '*'

  game-freeze:
    exemptions:
    - operator
    bypass-permission: ''
    allowed: []
    disabled:
    - '*'
```

* `status` - the status listed [above](#features)
  * `exemptions` - The list of players who can use the commands even if it is disabled
    * Specify `operator` key once so all operator[^1] players can use commands normally
      * Player names can also be added to this list, these names are [case sensitive](#user-content-fn-2)[^2]
  * `bypass-permission` - The bypass permission to allow all commands even it is disabled
    * Leave it empty   so no players can bypass this
  * `allowed` - The list of allowed commands that players can use **(this only works if all commands are disabled)**
    * Specify `*` (star) character to allow all commands<br>

      ```yml
      allowed:
      - '*'
      ```
    * Commands can have aliases set, in order to recognise them use `|` character to separate them<br>

      ```yml
      allowed:
      - broadcast|bc
      ```
    * Multiple short commands can be separated with `;` character so you don't need to specify each of them in a new line<br>

      ```yml
      allowed:
      - stop;restart;reload
      ```
    * Commands with multiple arguments can be recognised as well using `,` character to only allow those while the others are disabled<br>

      ```yml
      allowed:
      - /rm leave,stopgame,kick,stop
      ```
    * Use `commandName *` to allow all arguments for a specific command, but you can not specify `*` and arguments as this is invalid<br>

      ```yml
      allowed:
      - /rm *
      ```
    * Leaving this list empty no commands will be allowed
  * `disabled` - The list of disabled commands that players can not use
    * Same list operation and use patterns as above

[^1]: <https://minecraft.wiki/w/Server#Management>

[^2]: <https://en.wikipedia.org/wiki/Case_sensitivity>


---

# 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://mdswork.gitbook.io/ragemode-docs/global-game-guides/game-commands.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.
