mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-06 00:07:56 +01:00
fix: null SpawnReason for new player (#9015)
This commit is contained in:
parent
b46708d565
commit
7d091ee970
@ -39,11 +39,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
+++ b/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 {
|
@@ -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....
|
||||||
}
|
}
|
||||||
|
// Paper
|
||||||
+ if (nbttagcompound == null) player.fudgeSpawnLocation(worldserver1); // Paper - only move to spawn on first login, otherwise, stay where you are....
|
|
||||||
+
|
|
||||||
player.setLevel(worldserver1);
|
player.setLevel(worldserver1);
|
||||||
String s1 = "local";
|
|
||||||
|
|
||||||
|
@ -25,6 +25,18 @@ diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/ma
|
|||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
+++ b/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
|
||||||
|
+ }
|
||||||
|
+ // Paper
|
||||||
|
player.setLevel(worldserver1);
|
||||||
|
String s1 = "local";
|
||||||
|
|
||||||
@@ -0,0 +0,0 @@ public abstract class PlayerList {
|
@@ -0,0 +0,0 @@ public abstract class PlayerList {
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
ServerLevel finalWorldServer = worldserver1;
|
ServerLevel finalWorldServer = worldserver1;
|
||||||
|
Loading…
Reference in New Issue
Block a user