fix: null SpawnReason for new player (#9015)

This commit is contained in:
elmital
2023-04-02 20:37:53 +02:00
parent b46708d565
commit 7d091ee970
2 changed files with 17 additions and 6 deletions

View File

@@ -39,11 +39,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -0,0 +0,0 @@ public abstract class PlayerList {
worldserver1 = worldserver;
// Paper
if (nbttagcompound == null) {
player.spawnReason = org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT; // set Player SpawnReason to DEFAULT on first login
+ player.fudgeSpawnLocation(worldserver1); // only move to spawn on first login, otherwise, stay where you are....
}
+ if (nbttagcompound == null) player.fudgeSpawnLocation(worldserver1); // Paper - only move to spawn on first login, otherwise, stay where you are....
+
// Paper
player.setLevel(worldserver1);
String s1 = "local";