# 🧭 MultiLobby

It is designed for networks that have multiple lobby servers and want safer or more flexible lobby selection than a simple `/lobby` command.

***

### What It Does

The MultiLobby module allows NexusProxy to route players between multiple configured lobby servers.

It is useful for:

* Multi-lobby networks
* Lobby balancing
* Safer lobby routing
* Cooldown-controlled lobby commands
* Bypass permissions
* Security bypass permissions
* Sending players to an available lobby instead of a single fixed server

***

### When To Enable It

Enable this module if your network has more than one lobby server and you want NexusProxy to choose or manage lobby routing more intelligently.

Use this module instead of the basic Lobby module if you need:

* Multiple lobby targets
* Better lobby distribution
* Cooldowns
* Bypass rules
* Safer lobby selection
* More control over lobby routing behavior

{% hint style="info" %}
If you only have one lobby server, the basic Lobby module may be enough.
{% endhint %}

***

### Requirements

The MultiLobby module does not require external dependencies.

| Dependency     | Required | Purpose                                     |
| -------------- | -------- | ------------------------------------------- |
| Redis          | No       | Not required for basic multi-lobby routing. |
| MySQL          | No       | Not required.                               |
| MongoDB        | No       | Not required.                               |
| PacketEvents   | No       | Not required.                               |
| Discord        | No       | Not required.                               |
| PlaceholderAPI | No       | Not required.                               |

***

### Configuration File

The MultiLobby module configuration file is located at:

```
plugins/NexusProxy/modules/multilobby/multilobby.yml
```

This file can contain settings for:

* Module status
* Lobby server targets
* Command names
* Command aliases
* Permissions
* Messages
* Cooldowns
* Bypass behavior
* Security options
* Routing behavior

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

The commands shown here are the default commands.
{% endhint %}

***

### Default Commands

| Command       | Description                                                                 |
| ------------- | --------------------------------------------------------------------------- |
| `/multilobby` | Sends the player to a configured lobby using the MultiLobby routing system. |
| `/mlobby`     | Alias for the MultiLobby command.                                           |

***

### Permissions

| Permission                              | Description                                                              |
| --------------------------------------- | ------------------------------------------------------------------------ |
| `nexusproxy.command.multilobby`         | Allows usage of the MultiLobby command.                                  |
| `nexusproxy.multilobby.bypass`          | Allows bypassing MultiLobby restrictions, depending on configuration.    |
| `nexusproxy.multilobby.security.bypass` | Allows bypassing MultiLobby security checks, depending on configuration. |

***

### Recommended LuckPerms Setup

#### Default players

```
/lp group default permission set nexusproxy.command.multilobby true
```

#### Staff bypass

```
/lp group staff permission set nexusproxy.multilobby.bypass true
```

#### Admin security bypass

```
/lp group admin permission set nexusproxy.multilobby.security.bypass true
```

{% hint style="warning" %}
Only give security bypass permissions to trusted administrators.

Security bypass permissions should not be given to normal players.
{% endhint %}

***

### Backend Lobby Servers

The lobby server names should match the backend server names configured in Velocity.

Example:

```yaml
servers:
  - "lobby-1"
  - "lobby-2"
  - "lobby-3"
```

{% hint style="warning" %}
The configured lobby names must match your Velocity server names.

If the names do not match, NexusProxy will not be able to send players to the correct backend server.
{% endhint %}

***

### Common Use Cases

#### Send yourself to a lobby

```
/multilobby
```

***

#### Use the alias

```
/mlobby
```

***

### Lobby vs MultiLobby

NexusProxy includes both Lobby and MultiLobby modules.

Use **Lobby** for simple lobby routing.

Use **MultiLobby** for more advanced routing across multiple lobby servers.

| Module     | Best For                                                              |
| ---------- | --------------------------------------------------------------------- |
| Lobby      | Simple `/lobby`, `/hub`, or `/hubs` routing.                          |
| MultiLobby | Multi-lobby routing, balancing, cooldowns, and safer lobby selection. |

***

### Setup Tips

* Use this module if your network has multiple lobby servers.
* Make sure all lobby server names exist in your Velocity configuration.
* Give `nexusproxy.command.multilobby` to normal players.
* Give bypass permissions only to staff or admin groups.
* Review cooldown settings in the module configuration.
* Review security-related settings before giving bypass permissions.
* Check `multilobby.yml` if you want to change command names or aliases.

***

### Common Issues

#### `/multilobby` does not work

Check that:

* The MultiLobby module is enabled.
* The player has `nexusproxy.command.multilobby`.
* The configured lobby servers exist in Velocity.
* At least one configured lobby server is online.
* The command was not renamed in `multilobby.yml`.
* Another plugin is not overriding the command.

***

#### Player is not sent to the expected lobby

Check that:

* Lobby server names are correct.
* The target lobby servers are online.
* Your routing behavior is configured correctly.
* The player is not affected by cooldowns or restrictions.
* The player does not need a bypass permission.

***

#### Cooldown blocks staff

If staff should bypass cooldowns or restrictions, give them:

```
nexusproxy.multilobby.bypass
```

If the issue is related to security checks, review whether they need:

```
nexusproxy.multilobby.security.bypass
```

{% hint style="danger" %}
Do not give security bypass permissions unless you understand what the permission allows in your configuration.
{% endhint %}

***

#### Another plugin is using `/mlobby`

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

```
plugins/NexusProxy/modules/multilobby/multilobby.yml
```

***

### Summary

The MultiLobby module is the advanced lobby routing system for NexusProxy.

It is recommended for networks with multiple lobby servers that need better routing control, cooldowns, bypass permissions, or safer lobby selection.


---

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