# ⏳ Queue

It supports queue joining, leaving queues, staff queue lists, priority permissions, target permissions, cooldown bypass, and holding servers depending on your configuration.

***

### What It Does

The Queue module provides a proxy-side queue system for your Velocity network.

It can be used for:

* Queuing players for backend servers
* Queuing players for server groups
* Managing full or restricted targets
* Priority-based queue positions
* Holding servers
* Queue list management
* Leaving queues
* Cooldown bypass
* Target-specific permissions
* Rank-based queue priority

***

### When To Enable It

Enable this module if your network needs a queue system for busy, limited, or high-demand servers.

This module is useful for:

* Survival launches
* Seasonal servers
* Event servers
* Full backend servers
* Premium queue access
* VIP priority queues
* Large networks with limited server capacity
* Controlled access to specific game modes

***

### Requirements

The Queue module does not require external dependencies.

| Dependency     | Required | Purpose       |
| -------------- | -------- | ------------- |
| Redis          | No       | Not required. |
| MySQL          | No       | Not required. |
| MongoDB        | No       | Not required. |
| PacketEvents   | No       | Not required. |
| Discord        | No       | Not required. |
| PlaceholderAPI | No       | Not required. |

***

### Configuration File

The Queue module configuration file is located at:

```
plugins/NexusProxy/modules/queue/queue.yml
```

This file can contain settings for:

* Module status
* Command names
* Command aliases
* Permissions
* Queue targets
* Server groups
* Holding servers
* Priority permissions
* Target permissions
* Cooldowns
* Queue messages
* Join behavior
* Leave behavior
* Staff list behavior

{% hint style="warning" %}
Command names, aliases, targets, priority permissions, and target permissions may be configurable in the module file.

The commands and permissions shown here are the default base values.
{% endhint %}

***

### Default Commands

| Command       | Description                                           |
| ------------- | ----------------------------------------------------- |
| `/queue`      | Joins or manages a queue, depending on configuration. |
| `/leavequeue` | Leaves the current queue.                             |
| `/queuelist`  | Shows queue information, usually for staff or admins. |

***

### Permissions

| Permission                      | Description                                                            |
| ------------------------------- | ---------------------------------------------------------------------- |
| `nexusproxy.command.queue`      | Allows usage of `/queue`.                                              |
| `nexusproxy.command.leavequeue` | Allows usage of `/leavequeue`.                                         |
| `nexusproxy.command.queuelist`  | Allows usage of `/queuelist`.                                          |
| Cooldown bypass permission      | Allows bypassing queue cooldowns, depending on configuration.          |
| Target permissions              | Controls access to specific queue targets, depending on configuration. |
| Priority permissions            | Controls queue priority, depending on configuration.                   |

{% hint style="info" %}
Target and priority permission names depend on your `queue.yml` configuration.
{% endhint %}

***

### Recommended LuckPerms Setup

#### Default players

```
/lp group default permission set nexusproxy.command.queue true
/lp group default permission set nexusproxy.command.leavequeue true
```

#### Staff

```
/lp group staff permission set nexusproxy.command.queuelist true
```

#### VIP priority example

```
/lp group vip permission set nexusproxy.queue.priority.vip true
```

#### MVP priority example

```
/lp group mvp permission set nexusproxy.queue.priority.mvp true
```

#### Admin cooldown bypass example

```
/lp group admin permission set nexusproxy.queue.cooldown.bypass true
```

{% hint style="warning" %}
The priority and cooldown bypass permissions above are examples.

Use the exact permissions configured in your `queue.yml`.
{% endhint %}

***

### Queue Targets

Queue targets are the servers or server groups players can queue for.

Example concept:

```yaml
targets:
  survival:
    servers:
      - "survival-1"
      - "survival-2"

  event:
    servers:
      - "event-1"
```

Players can then queue for a configured target, depending on your command syntax.

Example concept:

```
/queue survival
```

{% hint style="info" %}
The exact queue command syntax depends on your module configuration.
{% endhint %}

***

### Server Groups

The Queue module can be used with server groups instead of only one backend server.

This is useful when a game mode has multiple backend servers.

Example:

```yaml
targets:
  skyblock:
    servers:
      - "skyblock-1"
      - "skyblock-2"
      - "skyblock-3"
```

NexusProxy can then route queued players to one of the configured servers depending on queue behavior.

***

### Holding Servers

Holding servers are temporary servers where players can wait while they are queued.

This is useful when you want players to remain inside the network instead of being disconnected or blocked.

Example concept:

```yaml
holding_servers:
  - "queue-lobby"
```

Use holding servers for:

* Launch queues
* Event waiting areas
* Full server queues
* Premium queue rooms
* Controlled access networks

{% hint style="info" %}
Holding server behavior depends on your `queue.yml` configuration.
{% endhint %}

***

### Priority Permissions

Priority permissions allow some players to move faster through a queue.

This is commonly used for:

* VIP ranks
* MVP ranks
* Premium ranks
* Staff
* Partners
* Event access groups

Example concept:

```yaml
priority:
  default: 0
  vip:
    permission: "nexusproxy.queue.priority.vip"
    weight: 10
  mvp:
    permission: "nexusproxy.queue.priority.mvp"
    weight: 20
```

Higher priority can place players ahead of lower-priority players depending on your configuration.

{% hint style="warning" %}
Be careful with priority balancing.

If every rank has high priority, nobody really has priority. Matemática cruel, pero honesta.
{% endhint %}

***

### Target Permissions

Target permissions can restrict access to specific queues.

Example concept:

```yaml
targets:
  event:
    permission: "nexusproxy.queue.target.event"
```

This is useful for:

* Staff-only test servers
* Donor-only events
* Beta access
* Whitelisted launches
* Rank-specific servers

Example LuckPerms command:

```
/lp group vip permission set nexusproxy.queue.target.event true
```

***

### Queue Cooldowns

The Queue module may use cooldowns to prevent players from repeatedly joining queues.

Example concept:

```yaml
cooldown:
  enabled: true
  seconds: 10
```

Cooldown bypass can be given to trusted groups if configured.

Example:

```
/lp group admin permission set nexusproxy.queue.cooldown.bypass true
```

{% hint style="info" %}
Use cooldowns to prevent queue spam, especially on large networks.
{% endhint %}

***

### Queue List

The queue list command is usually used by staff to inspect active queues.

Default command:

```
/queuelist
```

This can help staff see:

* Active queues
* Queued players
* Queue sizes
* Target queues
* Priority behavior, depending on configuration

Permission:

```
nexusproxy.command.queuelist
```

***

### Leaving a Queue

Players can leave their current queue using:

```
/leavequeue
```

Permission:

```
nexusproxy.command.leavequeue
```

This is useful if a player no longer wants to wait for a target server.

***

### Common Use Cases

#### Join a queue

```
/queue survival
```

***

#### Leave a queue

```
/leavequeue
```

***

#### View queue list

```
/queuelist
```

***

#### Give players queue access

```
/lp group default permission set nexusproxy.command.queue true
/lp group default permission set nexusproxy.command.leavequeue true
```

***

#### Give staff queue list access

```
/lp group staff permission set nexusproxy.command.queuelist true
```

***

#### Give VIP queue priority

```
/lp group vip permission set nexusproxy.queue.priority.vip true
```

***

### Setup Tips

* Define clear queue targets in `queue.yml`.
* Use server groups for game modes with multiple backend servers.
* Use holding servers if players should wait inside the network.
* Give `/queue` and `/leavequeue` to normal players.
* Give `/queuelist` only to staff or admins.
* Use priority permissions for VIP or premium queues.
* Use target permissions for restricted queues.
* Add cooldowns to prevent spam.
* Test queue behavior before using it during a public launch.

***

### Common Issues

#### Players cannot join a queue

Check that:

* The Queue module is enabled.
* The player has `nexusproxy.command.queue`.
* The queue target exists in `queue.yml`.
* The player has the required target permission, if configured.
* The command syntax is correct.
* Another plugin is not overriding `/queue`.

***

#### Players cannot leave a queue

Check that:

* The player has `nexusproxy.command.leavequeue`.
* The player is currently in a queue.
* The command was not renamed in `queue.yml`.
* The module is enabled.

***

#### Staff cannot use `/queuelist`

Check that:

* The staff member has `nexusproxy.command.queuelist`.
* The Queue module is enabled.
* The command was not renamed in `queue.yml`.

***

#### Priority does not work

Check that:

* The player has the correct priority permission.
* Priority permissions are configured correctly in `queue.yml`.
* LuckPerms is assigning the permission correctly.
* No higher-priority or conflicting permission is overriding the expected priority.
* The queue target supports priority behavior.

***

#### Player is queued for the wrong server

Check that:

* The target configuration is correct.
* Server names match your Velocity configuration.
* The correct server group is assigned to the target.
* The queue command uses the intended target name.

***

#### Holding server does not work

Check that:

* The holding server exists in Velocity.
* The holding server is online.
* The holding server is configured correctly in `queue.yml`.
* The player is allowed to connect to the holding server.

***

#### Another plugin is using the same commands

If another plugin registers the same command or alias, change the command names or aliases in:

```
plugins/NexusProxy/modules/queue/queue.yml
```

***

### Summary

The Queue module provides a configurable queue system for NexusProxy.

It is recommended for networks that need queue targets, server groups, holding servers, rank-based priority, restricted queue access, and staff queue monitoring.


---

# 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://nexusproxy.nemesismc.net/modules/queue.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.
