Spawn command
The /spawn command that sends a player to the lobby, and how to rename it or turn it off.
/spawn sends a player to the lobby set with /md setlobby. On a network, /lobby and /hub send players to the least full lobby (see below).
Settings
In config.yml:
spawn:
enabled: true
command: spawn
aliases: []| Key | Default | Meaning |
|---|---|---|
enabled | true | false removes the command. Needs a restart |
command | spawn | The command name, without the slash |
aliases | empty | More names for the same command |
Example, renaming it to /hub and adding /l as an alias:
spawn:
enabled: true
command: hub
aliases: [l]The command is registered when the server starts, so a change needs a restart.
What it does in each situation
| The player is | /spawn does |
|---|---|
| In the lobby or anywhere with MineDuels on | Teleports to the lobby and resets health and effects |
| In a match, or waiting for a match to start | Refuses with spawn.in-match. /leave forfeits |
| On the post-match screen | Acts as the "leave to lobby" item |
| Spectating | Stops spectating and goes to the lobby |
| In the kit editor | Leaves the editor |
| In a world where MineDuels is off | Refuses with worlds.command-blocked, so it cannot be used to escape a fight |
| Anywhere, with no lobby set | Refuses with spawn.no-lobby |
When another plugin has /spawn
Two plugins cannot own the same command name. If EssentialsX or another plugin already has /spawn, either set spawn.enabled: false and use theirs, or give MineDuels another name:
spawn:
command: lobbyOn a cross-server network
/lobby, /hub and /gduel belong to cross-server. MineDuels does not let spawn.command or spawn.aliases take those names while cross-server.enabled is true:
config.yml: spawn.command 'lobby' cannot be used; /spawn is off
config.yml: spawn.aliases: /hub is the cross-server command; skippedUse a different name, such as spawn.
Messages
In messages.yml under spawn:
| Key | Shown when |
|---|---|
players-only | The console runs the command |
in-match | The player is in a match: /leave forfeits |
no-lobby | No lobby is set. Run /md setlobby |
sent | After the teleport. Empty by default, so no message |
failed | The teleport could not happen. Try again |
spawn:
sent: "<prefix><gray>Welcome back to the lobby."Related: Installation, Cross-Server operations.