mojira.dev
MC-227566

Hardcore mode does not work properly on servers (allows players to respawn) if force-gamemode is set to true

On a Hardcore server, if force-gamemode in server.properties is true, players who have died and spectate the world will be revived after they join the server again.

To reproduce

  1. Start a server with the following settings in server.properties:

    hardcore=true
    force-gamemode=true
  2. Join the server

  3. Die

  4. Click "Spectate World"

  5. Leave the server and join it again
    → ❌ You're back in Survival / Hardcore mode again

Video

https://youtu.be/DIC0TAbnczs

Linked issues

Comments 4

Am able to confirm. The setting "force-gamemode" is the cause, with it set to false it works as expected.

This issue is present in 1.20.2.

"force-gamemode" is set to false, but players can still respawn by clicking "Spectate World" in my server, 1.20.4

Can confirm for 1.21.3 

Sandor Fodor

(Unassigned)

Confirmed

Dedicated Server

1.16.5, 1.17 Release Candidate 1, 1.20.4, 1.21.3

Retrieved