Skip to Content
MineDuels

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: []
KeyDefaultMeaning
enabledtruefalse removes the command. Needs a restart
commandspawnThe command name, without the slash
aliasesemptyMore 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 onTeleports to the lobby and resets health and effects
In a match, or waiting for a match to startRefuses with spawn.in-match. /leave forfeits
On the post-match screenActs as the "leave to lobby" item
SpectatingStops spectating and goes to the lobby
In the kit editorLeaves the editor
In a world where MineDuels is offRefuses with worlds.command-blocked, so it cannot be used to escape a fight
Anywhere, with no lobby setRefuses 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: lobby

On 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; skipped

Use a different name, such as spawn.

Messages

In messages.yml under spawn:

KeyShown when
players-onlyThe console runs the command
in-matchThe player is in a match: /leave forfeits
no-lobbyNo lobby is set. Run /md setlobby
sentAfter the teleport. Empty by default, so no message
failedThe teleport could not happen. Try again
spawn:
  sent: "<prefix><gray>Welcome back to the lobby."

Related: Installation, Cross-Server operations.

On this page