If "respawn-at-home-bed" and "respawn-at-home" are set to true in the EssentialsX config, "respawn-at-anchor" is ultimately ignored.
Type of bug
Other unexpected behaviour
/ess dump all output
N/A
Error log (if applicable)
No response
Bug description
The bugged code is in the onPlayerRespawn method in EssentialsSpawnPlayerListener.
The respawn-at-anchor option works by simply returning without modifying the spawn location if the default Minecraft spawn is a respawn anchor and the respawn-at-anchor option is set to true. However, if it isn't set to true, while respawn-at-home and respawn-at-home-bed are, the respawn point will ultimately get set to the value of the method getBedSpawnLocation() in the Spigot API. In spite of this method's name, it doesn't just get bed spawn locations, but also gets the location of respawn anchors.
As a result, if a player's respawn point is set to a respawn anchor and respawn-at-home-bed and respawn-at-home are true, the player will still respawn at the respawn anchor.
Steps to reproduce
- Set
respawn-at-anchorto false, andrespawn-at-homeandrespawn-at-home-bedto true in the Essentials configuration. - Mark your spawn at a respawn anchor.
- Try respawning.
Expected behaviour
Players should be unable to respawn at respawn anchors unless respawn-at-anchor is true.
Actual behaviour
Players can respawn at respawn anchors if respawn-at-home-bed and respawn-at-home are set to true.
Additional Information
No response