Skip to content

If "respawn-at-home-bed" and "respawn-at-home" are set to true in the EssentialsX config, "respawn-at-anchor" is ultimately ignored. #5824

@gibsonpil

Description

@gibsonpil

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

  1. Set respawn-at-anchor to false, and respawn-at-home and respawn-at-home-bed to true in the Essentials configuration.
  2. Mark your spawn at a respawn anchor.
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug: unconfirmedPotential bugs that need replicating to verify.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions