Spawn Module
File: modules/spawn/config.yml
The Spawn module manages the server's spawn point and controls how players are handled on respawn and join. It provides fine-grained control over respawn priorities (bed, home, respawn anchor) and allows you to configure whether players are teleported to spawn when they first join or on every login.
Source Configuration
enable: true
respawn-listener-priority: highest # none, lowest, low, normal, high, highest
spawn-join-listener-priority: highest
respawn-at-anchor: false
respawn-at-home: false
respawn-at-bed: true
teleport-at-spawn-on-join: false
Options
| Option | Type | Default | Description |
|---|---|---|---|
enable | Boolean | true | Enable or disable the Spawn module |
respawn-listener-priority | String | highest | The Bukkit event priority for the respawn listener. Accepts: none, lowest, low, normal, high, highest. Use none to disable the respawn listener entirely |
spawn-join-listener-priority | String | highest | The Bukkit event priority for the join listener that handles spawn teleportation. Accepts: none, lowest, low, normal, high, highest. Use none to disable the join listener entirely |
respawn-at-anchor | Boolean | false | If true, players will respawn at their respawn anchor (Nether) when available |
respawn-at-home | Boolean | false | If true, players will respawn at their home location (set via /sethome) when available |
respawn-at-bed | Boolean | true | If true, players will respawn at their bed location when available |
teleport-at-spawn-on-join | Boolean | false | If true, players are teleported to the server spawn point every time they join the server |
The respawn-listener-priority and spawn-join-listener-priority options control the order in which zEssentials processes the respawn and join events relative to other plugins. Setting these to highest ensures zEssentials has the final say. Set to none to completely disable that listener, letting other plugins handle it instead.
Respawn Behavior
When a player dies and respawns, the plugin checks the following locations in order of priority:
- Respawn Anchor -- If
respawn-at-anchoristrueand the player has a valid respawn anchor set. - Home -- If
respawn-at-homeistrueand the player has a home location set. - Bed -- If
respawn-at-bedistrueand the player has a valid bed spawn. - Server Spawn -- If none of the above conditions are met, the player respawns at the server spawn point.
Only one respawn location is used per death. The first valid option in the priority chain above is selected. If you want players to always respawn at spawn, set all three options (respawn-at-anchor, respawn-at-home, respawn-at-bed) to false.
If respawn-at-bed is true (the default), players with a valid bed will respawn there instead of at the server spawn. This is standard vanilla behavior. Set it to false if you want to override this for your server.
How It Works
- An administrator sets the spawn point using
/setspawnat the desired location. - Optionally, a first-join spawn is set using
/setfirstspawnfor new players. - When a player dies, the respawn listener evaluates the configured respawn options and teleports the player accordingly.
- When a player joins, if
teleport-at-spawn-on-joinistrue, they are teleported to the server spawn. - First-time players are teleported to the first spawn location (if configured), regardless of the
teleport-at-spawn-on-joinsetting.
Related Commands
| Command | Permission | Description |
|---|---|---|
/spawn | essentials.spawn | Teleport to the server spawn point |
/setspawn | essentials.setspawn | Set the server spawn point at your current location |
/firstspawn | essentials.firstspawn | Teleport to the first-join spawn point |
/setfirstspawn | essentials.setfirstspawn | Set the first-join spawn point at your current location |
For the full command list, see Commands & Permissions.
Common Configurations
Always Respawn at Spawn
To force all players to respawn at the server spawn regardless of beds, anchors, or homes:
respawn-at-anchor: false
respawn-at-home: false
respawn-at-bed: false
Teleport to Spawn on Every Join
To teleport players to spawn each time they log in (useful for lobby servers):
teleport-at-spawn-on-join: true
Let Other Plugins Handle Respawn
To disable zEssentials' respawn handling and let another plugin (e.g., a minigame plugin) control respawn behavior:
respawn-listener-priority: none
Setting the listener priority to none completely disables that listener. This is different from setting it to lowest, which still processes the event but allows other plugins to override it.