Problem:
The Code provided down below is going to change the Gamemode of every Player that respawns to Spectator. However, the Player is not able to fly through Blocks then.
How to recreate:
Just copy the Code down below. And run it.
@EventHandler public void playerRespawnEvent(PlayerRespawnEvent event) { event.getPlayer().setGameMode(GameMode.SPECTATOR); }
Client
Default Minecraft Launcher
Server Version
1.16.5
Client Version
1.16.5
My Server is running with PaperMC, but I use the Spigot API for my Code. So, I am not completely sure if the Issue is caused by Paper or by the Spigot API
Problem: The Code provided down below is going to change the Gamemode of every Player that respawns to Spectator. However, the Player is not able to fly through Blocks then.
How to recreate: Just copy the Code down below. And run it.
@EventHandler public void playerRespawnEvent(PlayerRespawnEvent event) { event.getPlayer().setGameMode(GameMode.SPECTATOR); }
Client Default Minecraft Launcher
Server Version 1.16.5
Client Version 1.16.5
My Server is running with PaperMC, but I use the Spigot API for my Code. So, I am not completely sure if the Issue is caused by Paper or by the Spigot API