# Invitation

Players waiting in a game lobby can invite other players to join to the game. Players who leave the game, all invitations will be cancelled. Use `/rm invite player <playerName>` to invite players.

## Features

* Commands for invitation, revoke and accept
* Option to limit how many invites can the player send
* Option to define expiration minutes for invitations
* Option to determine if spectators can invite other players

## Commands

* `/rm invite player <playerName>` - Invites a specific player to the game
* `/rm invite accept` - Accepts the last invitation
* `/rm invite accept -s` - Accepts the last invitation and joining as spectator
* `/rm invite revoke [player]` - Revokes the last or specific invitation from the player

## Configuration

```yml
player-invitation:
  enable: true
  max-invite: 3
  expiration-minutes: 1
  allow-spectators-to-invite: false
```

* `max-invite` - The maximum invite a player can send
  * you can as well control this value with `ragemode.invite.limit.<value>` permission to have a specific limit value per player
    * permissions with a value of 0 have higher priority, otherwise multiple limit permissions will sum them
  * Set to 0 for no limitation
* `expiration-minutes` - Expiration time in minutes, while the player can accept the invitation
  * Set to 0 so invitations will expire on server stop only
* `allow-spectators-to-invite` - If enabled, spectator players are allowed to invite other players to game


---

# 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/invitation.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.
