# 🏠 Lobby

It allows players to return to a configured lobby server using commands such as `/lobby`, `/hub`, or `/hubs`.

***

### What It Does

The Lobby module lets players quickly connect to a lobby server from anywhere in your network.

It is useful for:

* Sending players back to the lobby
* Providing `/hub` and `/lobby` commands
* Routing players to configured backend lobby servers
* Allowing staff or selected groups to bypass certain restrictions, depending on configuration

***

### When To Enable It

Enable this module if your network has one or more lobby servers and you want NexusProxy to handle lobby commands from the proxy.

This module is recommended for most networks that use a central lobby or hub.

***

### Requirements

The Lobby module does not require external dependencies.

| Dependency     | Required | Purpose                               |
| -------------- | -------- | ------------------------------------- |
| Redis          | No       | Not required for basic 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 Lobby module configuration file is located at:

```
plugins/NexusProxy/modules/lobby/lobby.yml
```

This file can contain settings for:

* Module status
* Lobby server names
* Command names
* Command aliases
* Permissions
* Messages
* Bypass 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                                    |
| -------- | ---------------------------------------------- |
| `/lobby` | Sends the player to a configured lobby server. |
| `/hub`   | Alias for the lobby command.                   |
| `/hubs`  | Alias for the lobby command.                   |

***

### Permissions

| Permission                 | Description                                                      |
| -------------------------- | ---------------------------------------------------------------- |
| `nexusproxy.command.lobby` | Allows usage of the lobby command.                               |
| `nexusproxy.lobby.bypass`  | Allows bypassing lobby restrictions, depending on configuration. |

***

### Recommended LuckPerms Setup

#### Default players

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

#### Staff or VIP bypass

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

{% hint style="info" %}
Only give the bypass permission to groups that should ignore configured lobby restrictions.
{% endhint %}

***

### Backend Lobby Servers

The backend lobby server names are configured in:

```
plugins/NexusProxy/modules/lobby/lobby.yml
```

The server names should match the backend server names configured in your Velocity configuration.

Example:

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

{% hint style="warning" %}
The lobby server 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 the lobby

```
/lobby
```

***

#### Use the hub alias

```
/hub
```

***

#### Use the hubs alias

```
/hubs
```

***

### Setup Tips

* Use this module for simple lobby routing.
* Make sure your lobby server names match your Velocity configuration.
* Give `nexusproxy.command.lobby` to default players.
* Give `nexusproxy.lobby.bypass` only to trusted groups if needed.
* Check `lobby.yml` if you want to change command names or aliases.
* If you need advanced multi-lobby balancing, use the MultiLobby module instead.

***

### Lobby vs MultiLobby

NexusProxy includes both Lobby and MultiLobby modules.

Use **Lobby** if you need a simple `/lobby` or `/hub` command.

Use **MultiLobby** if you need more advanced routing, multiple lobby balancing, cooldowns, bypass behavior, or safer lobby selection.

| Module     | Best For                                    |
| ---------- | ------------------------------------------- |
| Lobby      | Simple lobby or hub routing.                |
| MultiLobby | Advanced multi-lobby routing and balancing. |

***

### Common Issues

#### `/lobby` does not work

Check that:

* The Lobby module is enabled.
* The player has `nexusproxy.command.lobby`.
* The lobby server name exists in your Velocity configuration.
* The lobby server is online.
* The command was not renamed in `lobby.yml`.
* Another plugin is not overriding `/lobby`.

***

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

Check that:

* The configured lobby server names are correct.
* The backend server names match Velocity.
* The target lobby server is available.
* Your routing settings are configured correctly.

***

#### Another plugin is using `/hub`

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

```
plugins/NexusProxy/modules/lobby/lobby.yml
```

***

### Summary

The Lobby module provides simple and reliable lobby routing for Velocity networks.

It is recommended if your network uses a central lobby and needs commands such as `/lobby`, `/hub`, or `/hubs`.


---

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