fix: null SpawnReason for new player (#9015)
Dieser Commit ist enthalten in:
Ursprung
50e683de14
Commit
1d2fe64da8
@ -22,10 +22,22 @@ index e46f18e342f2e682c4d5bbac22187a171df8eb33..58c1769ea15249df950a40e2f164e2ff
|
||||
// Paper start
|
||||
if (DEBUG_ENTITIES) {
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 9905d2174582b38913752c2e86e4d610baff181d..026bba5551dd77d616eb11c59575f9fea28000af 100644
|
||||
index 9905d2174582b38913752c2e86e4d610baff181d..ef97fd5cb80626df1c2a3837641c9a06d6ad0390 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -363,7 +363,7 @@ public abstract class PlayerList {
|
||||
@@ -223,6 +223,11 @@ 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";
|
||||
|
||||
@@ -363,7 +368,7 @@ public abstract class PlayerList {
|
||||
// CraftBukkit start
|
||||
ServerLevel finalWorldServer = worldserver1;
|
||||
Entity entity = EntityType.loadEntityRecursive(nbttagcompound1.getCompound("Entity"), finalWorldServer, (entity1) -> {
|
||||
@ -35,7 +47,7 @@ index 9905d2174582b38913752c2e86e4d610baff181d..026bba5551dd77d616eb11c59575f9fe
|
||||
});
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index b4929ecb7e49266b88eec433a65fd8cf049dd805..80806cd557a481ffbfa9b26e84d1ab1bcba0543f 100644
|
||||
index 1b6b71d80a8c1e213186473f1c0ff72ca72ce307..b75129ade324835f02a35ae390c15a03139aa6aa 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -233,6 +233,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Implement PlayerPostRespawnEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 026bba5551dd77d616eb11c59575f9fea28000af..d677a05741e1df4bba2598182256758d4da09a4b 100644
|
||||
index ef97fd5cb80626df1c2a3837641c9a06d6ad0390..fcac88d07fc4c74c8aca949954a08ae6580ad268 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -743,9 +743,14 @@ public abstract class PlayerList {
|
||||
@@ -748,9 +748,14 @@ public abstract class PlayerList {
|
||||
|
||||
boolean flag2 = false;
|
||||
|
||||
@ -24,7 +24,7 @@ index 026bba5551dd77d616eb11c59575f9fea28000af..d677a05741e1df4bba2598182256758d
|
||||
ServerLevel worldserver1 = this.server.getLevel(entityplayer.getRespawnDimension());
|
||||
if (worldserver1 != null) {
|
||||
Optional optional;
|
||||
@@ -797,6 +802,7 @@ public abstract class PlayerList {
|
||||
@@ -802,6 +807,7 @@ public abstract class PlayerList {
|
||||
|
||||
location = respawnEvent.getRespawnLocation();
|
||||
if (!flag) entityplayer.reset(); // SPIGOT-4785
|
||||
@ -32,7 +32,7 @@ index 026bba5551dd77d616eb11c59575f9fea28000af..d677a05741e1df4bba2598182256758d
|
||||
} else {
|
||||
location.setWorld(worldserver.getWorld());
|
||||
}
|
||||
@@ -856,6 +862,13 @@ public abstract class PlayerList {
|
||||
@@ -861,6 +867,13 @@ public abstract class PlayerList {
|
||||
if (entityplayer.connection.isDisconnected()) {
|
||||
this.save(entityplayer);
|
||||
}
|
||||
|
@ -7,10 +7,10 @@ The problem was we were checking isExpired() on the entry, but if it
|
||||
was expired at that point, then it would be null.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index d677a05741e1df4bba2598182256758d4da09a4b..1644ff0709d721ba8c19e4b4c7ef07fc8e8f5918 100644
|
||||
index fcac88d07fc4c74c8aca949954a08ae6580ad268..edbdd78ea15bac49d37e171b3ebc7f89ec54cbe6 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -627,8 +627,10 @@ public abstract class PlayerList {
|
||||
@@ -632,8 +632,10 @@ public abstract class PlayerList {
|
||||
Player player = entity.getBukkitEntity();
|
||||
PlayerLoginEvent event = new PlayerLoginEvent(player, loginlistener.connection.hostname, ((java.net.InetSocketAddress) socketaddress).getAddress(), ((java.net.InetSocketAddress) loginlistener.connection.channel.remoteAddress()).getAddress());
|
||||
|
||||
|
@ -14,10 +14,10 @@ movement will load only the chunk the player enters anyways and avoids loading
|
||||
massive amounts of surrounding chunks due to large AABB lookups.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 1644ff0709d721ba8c19e4b4c7ef07fc8e8f5918..2e61c92787625fc9c116cd6d8dc9097c2f7d709f 100644
|
||||
index edbdd78ea15bac49d37e171b3ebc7f89ec54cbe6..56a8c90d3bf0e860acbabcd45957f51f8431317f 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -812,6 +812,7 @@ public abstract class PlayerList {
|
||||
@@ -817,6 +817,7 @@ public abstract class PlayerList {
|
||||
entityplayer1.forceSetPositionRotation(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());
|
||||
// CraftBukkit end
|
||||
|
||||
@ -26,7 +26,7 @@ index 1644ff0709d721ba8c19e4b4c7ef07fc8e8f5918..2e61c92787625fc9c116cd6d8dc9097c
|
||||
entityplayer1.setPos(entityplayer1.getX(), entityplayer1.getY() + 1.0D, entityplayer1.getZ());
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 6fa842ae2f419a42d830b417f4d624451e6c4325..8cfa823940b0fada04022034023f5372f1ca8b9f 100644
|
||||
index dc1af76289cee7e38f6cbfdb5e62fac5802a08b3..8c922e29ae57f781d4f27d53b04ed90a24d81ca4 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -236,6 +236,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
|
@ -35,15 +35,14 @@ index 52ee3440b09b227bf1f488f374a0e282690f6ba4..007513080938a8d0cf43c050ef4e1132
|
||||
this.gameMode.setLevel((ServerLevel) world);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 2e61c92787625fc9c116cd6d8dc9097c2f7d709f..187b3dc881f226963af5b61a2c4b957ecf537cf5 100644
|
||||
index 56a8c90d3bf0e860acbabcd45957f51f8431317f..ac8882d0d2939bd6e59dc4e08bc1efc88a580360 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -223,6 +223,8 @@ public abstract class PlayerList {
|
||||
worldserver1 = worldserver;
|
||||
@@ -226,6 +226,7 @@ public abstract class PlayerList {
|
||||
// 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";
|
||||
|
||||
|
@ -269,10 +269,10 @@ index f22c50f0a2ef05e9f52550db7c40b5b99632650c..549ea8e0fe702615eefcbfd1cd6a30e0
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 187b3dc881f226963af5b61a2c4b957ecf537cf5..a4b3e2caf550f578ac06c5d17077fe08aaa07a57 100644
|
||||
index ac8882d0d2939bd6e59dc4e08bc1efc88a580360..a58731d04581409eb322a327008a20ea64a03d89 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -533,7 +533,7 @@ public abstract class PlayerList {
|
||||
@@ -537,7 +537,7 @@ public abstract class PlayerList {
|
||||
this.cserver.getPluginManager().callEvent(playerQuitEvent);
|
||||
entityplayer.getBukkitEntity().disconnect(playerQuitEvent.getQuitMessage());
|
||||
|
||||
|
@ -55,10 +55,10 @@ index 2d54f2abae82521fbd34aa046f26ec8e72df8362..e465e3e45eeeecc31dafc1f04505c04e
|
||||
public String kickLeaveMessage = null; // SPIGOT-3034: Forward leave message to PlayerQuitEvent
|
||||
// CraftBukkit end
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index a4b3e2caf550f578ac06c5d17077fe08aaa07a57..d483f69d376b486dfca8b4b58d43855c319e60b5 100644
|
||||
index a58731d04581409eb322a327008a20ea64a03d89..b3ef5b9cb279cf44178536564e431ea29ba9433f 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -297,6 +297,12 @@ public abstract class PlayerList {
|
||||
@@ -301,6 +301,12 @@ public abstract class PlayerList {
|
||||
this.playersByUUID.put(player.getUUID(), player);
|
||||
// this.broadcastAll(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(entityplayer))); // CraftBukkit - replaced with loop below
|
||||
|
||||
@ -71,7 +71,7 @@ index a4b3e2caf550f578ac06c5d17077fe08aaa07a57..d483f69d376b486dfca8b4b58d43855c
|
||||
// CraftBukkit start
|
||||
CraftPlayer bukkitPlayer = player.getBukkitEntity();
|
||||
|
||||
@@ -335,6 +341,8 @@ public abstract class PlayerList {
|
||||
@@ -339,6 +345,8 @@ public abstract class PlayerList {
|
||||
player.connection.send(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(entityplayer1)));
|
||||
}
|
||||
player.sentListPacket = true;
|
||||
@ -80,7 +80,7 @@ index a4b3e2caf550f578ac06c5d17077fe08aaa07a57..d483f69d376b486dfca8b4b58d43855c
|
||||
// CraftBukkit end
|
||||
|
||||
player.getEntityData().refresh(player); // CraftBukkit - BungeeCord#2321, send complete data to self on spawn
|
||||
@@ -360,6 +368,11 @@ public abstract class PlayerList {
|
||||
@@ -364,6 +372,11 @@ public abstract class PlayerList {
|
||||
playerconnection.send(new ClientboundUpdateMobEffectPacket(player.getId(), mobeffect));
|
||||
}
|
||||
|
||||
@ -92,7 +92,7 @@ index a4b3e2caf550f578ac06c5d17077fe08aaa07a57..d483f69d376b486dfca8b4b58d43855c
|
||||
if (nbttagcompound != null && nbttagcompound.contains("RootVehicle", 10)) {
|
||||
CompoundTag nbttagcompound1 = nbttagcompound.getCompound("RootVehicle");
|
||||
// CraftBukkit start
|
||||
@@ -408,6 +421,10 @@ public abstract class PlayerList {
|
||||
@@ -412,6 +425,10 @@ public abstract class PlayerList {
|
||||
}
|
||||
}
|
||||
|
||||
@ -103,7 +103,7 @@ index a4b3e2caf550f578ac06c5d17077fe08aaa07a57..d483f69d376b486dfca8b4b58d43855c
|
||||
player.initInventoryMenu();
|
||||
// CraftBukkit - Moved from above, added world
|
||||
// Paper start - Add to collideRule team if needed
|
||||
@@ -417,6 +434,7 @@ public abstract class PlayerList {
|
||||
@@ -421,6 +438,7 @@ public abstract class PlayerList {
|
||||
scoreboard.addPlayerToTeam(player.getScoreboardName(), collideRuleTeam);
|
||||
}
|
||||
// Paper end
|
||||
|
@ -127,10 +127,10 @@ index d560e5dee586bb3b501e9a78083b9aa961c48fc5..ce6ae0ec4d104929f2c3fe03b0f44eaf
|
||||
private static final int NEUTRAL_MOB_DEATH_NOTIFICATION_RADII_Y = 10;
|
||||
public ServerGamePacketListenerImpl connection;
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index d483f69d376b486dfca8b4b58d43855c319e60b5..68701c1de6d7060f65648b1404209e8c9891fccc 100644
|
||||
index b3ef5b9cb279cf44178536564e431ea29ba9433f..b553d739d025e2017532f1cab9e21a24a1fa898a 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -521,6 +521,7 @@ public abstract class PlayerList {
|
||||
@@ -525,6 +525,7 @@ public abstract class PlayerList {
|
||||
|
||||
protected void save(ServerPlayer player) {
|
||||
if (!player.getBukkitEntity().isPersistent()) return; // CraftBukkit
|
||||
@ -138,7 +138,7 @@ index d483f69d376b486dfca8b4b58d43855c319e60b5..68701c1de6d7060f65648b1404209e8c
|
||||
this.playerIo.save(player);
|
||||
ServerStatsCounter serverstatisticmanager = (ServerStatsCounter) player.getStats(); // CraftBukkit
|
||||
|
||||
@@ -1111,10 +1112,22 @@ public abstract class PlayerList {
|
||||
@@ -1115,10 +1116,22 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
public void saveAll() {
|
||||
|
@ -10,10 +10,10 @@ This fixes that by checking if the modified spawn location is
|
||||
still at a respawn anchor.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 75ff056a8e68a1286ef6bd7fec841721951e1344..391375642822d95f6d874a26d41b27ec4f4b8c08 100644
|
||||
index eb2f861d107a81a6c8e4de2668a886a29eff141e..4c4e7c7f2dba3a8f219a5d41ca727e0a3251f341 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -780,6 +780,7 @@ public abstract class PlayerList {
|
||||
@@ -784,6 +784,7 @@ public abstract class PlayerList {
|
||||
// Paper start
|
||||
boolean isBedSpawn = false;
|
||||
boolean isRespawn = false;
|
||||
@ -21,7 +21,7 @@ index 75ff056a8e68a1286ef6bd7fec841721951e1344..391375642822d95f6d874a26d41b27ec
|
||||
// Paper end
|
||||
|
||||
// CraftBukkit start - fire PlayerRespawnEvent
|
||||
@@ -790,7 +791,7 @@ public abstract class PlayerList {
|
||||
@@ -794,7 +795,7 @@ public abstract class PlayerList {
|
||||
Optional optional;
|
||||
|
||||
if (blockposition != null) {
|
||||
@ -30,7 +30,7 @@ index 75ff056a8e68a1286ef6bd7fec841721951e1344..391375642822d95f6d874a26d41b27ec
|
||||
} else {
|
||||
optional = Optional.empty();
|
||||
}
|
||||
@@ -834,7 +835,12 @@ public abstract class PlayerList {
|
||||
@@ -838,7 +839,12 @@ public abstract class PlayerList {
|
||||
}
|
||||
// Spigot End
|
||||
|
||||
@ -44,7 +44,7 @@ index 75ff056a8e68a1286ef6bd7fec841721951e1344..391375642822d95f6d874a26d41b27ec
|
||||
if (!flag) entityplayer.reset(); // SPIGOT-4785
|
||||
isRespawn = true; // Paper
|
||||
} else {
|
||||
@@ -874,8 +880,14 @@ public abstract class PlayerList {
|
||||
@@ -878,8 +884,14 @@ public abstract class PlayerList {
|
||||
}
|
||||
// entityplayer1.initInventoryMenu();
|
||||
entityplayer1.setHealth(entityplayer1.getHealth());
|
||||
|
@ -49,10 +49,10 @@ index 459403f9c8a784c3911d5ba163a2c90efef00e9f..7ffe3a9978d58831fe2f01c3b19dfd8b
|
||||
this.connection.disconnect(ichatbasecomponent);
|
||||
}));
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index b6cfea5de71d85c76a9ed6d10b9dd16d3d66f4d8..98e675b7aa4b59fe93bae1049ce09191d426ad9e 100644
|
||||
index e9650927ad7b74d796efd928d396e9923699f703..7e40da6f44b9e1ce4a4d860ba6349675ce69f6c4 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -559,7 +559,7 @@ public abstract class PlayerList {
|
||||
@@ -563,7 +563,7 @@ public abstract class PlayerList {
|
||||
entityplayer.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.DISCONNECT); // Paper
|
||||
}
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Expose world spawn angle
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 98e675b7aa4b59fe93bae1049ce09191d426ad9e..7548dec1f84837c52a29dbc65cfc5480cf04a0be 100644
|
||||
index 7e40da6f44b9e1ce4a4d860ba6349675ce69f6c4..1d458a6d5c3b93d8823fd37ed23027f1e4dc4769 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -823,7 +823,7 @@ public abstract class PlayerList {
|
||||
@@ -827,7 +827,7 @@ public abstract class PlayerList {
|
||||
if (location == null) {
|
||||
worldserver1 = this.server.getLevel(Level.OVERWORLD);
|
||||
blockposition = entityplayer1.getSpawnPoint(worldserver1);
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix villager boat exploit
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 7548dec1f84837c52a29dbc65cfc5480cf04a0be..507cc4e55979767263bf1f73c1f1505c449b312b 100644
|
||||
index 1d458a6d5c3b93d8823fd37ed23027f1e4dc4769..22f362143f7c01742dd07220dac5ea3dc691d43c 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -584,6 +584,14 @@ public abstract class PlayerList {
|
||||
@@ -588,6 +588,14 @@ public abstract class PlayerList {
|
||||
PlayerList.LOGGER.debug("Removing player mount");
|
||||
entityplayer.stopRiding();
|
||||
entity.getPassengersAndSelf().forEach((entity1) -> {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add sendOpLevel API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 507cc4e55979767263bf1f73c1f1505c449b312b..a697583cbfb50230771a58feed7d1e9d13320961 100644
|
||||
index 22f362143f7c01742dd07220dac5ea3dc691d43c..e3631616f04c3051b306fbdf49138b50a00abae2 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1072,6 +1072,11 @@ public abstract class PlayerList {
|
||||
@@ -1076,6 +1076,11 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
private void sendPlayerPermissionLevel(ServerPlayer player, int permissionLevel) {
|
||||
@ -20,7 +20,7 @@ index 507cc4e55979767263bf1f73c1f1505c449b312b..a697583cbfb50230771a58feed7d1e9d
|
||||
if (player.connection != null) {
|
||||
byte b0;
|
||||
|
||||
@@ -1086,8 +1091,10 @@ public abstract class PlayerList {
|
||||
@@ -1090,8 +1095,10 @@ public abstract class PlayerList {
|
||||
player.connection.send(new ClientboundEntityEventPacket(player, b0));
|
||||
}
|
||||
|
||||
@ -32,7 +32,7 @@ index 507cc4e55979767263bf1f73c1f1505c449b312b..a697583cbfb50230771a58feed7d1e9d
|
||||
|
||||
public boolean isWhiteListed(GameProfile profile) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 08d006e190cf13c8d737654b8c8f2045610afd43..d784cef362b1c13348d49ffb60f3403fc9471f0c 100644
|
||||
index c0338f597b9c50218862005220a8753d5822a6e4..0b0dc51dfb7174c359305448575ae714398917e4 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -654,6 +654,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
@ -7,10 +7,10 @@ Fixes disappearance of held items, when a player gets disconnected and PlayerDro
|
||||
Closes #5036
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 88deb7961f64976e16d1b42c6a798665a4fa59e6..3a7fd83061b8c372c7ac8d1c843ae5d041d78e1a 100644
|
||||
index 3eb3dbe7557fb5e048be6fe2fee92e4d7653a05f..b0fabcf2435a8b89d52fbea29a20bd64e91c046c 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -577,6 +577,14 @@ public abstract class PlayerList {
|
||||
@@ -581,6 +581,14 @@ public abstract class PlayerList {
|
||||
}
|
||||
// Paper end
|
||||
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Fix anchor respawn acting as a bed respawn from the end
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 3a7fd83061b8c372c7ac8d1c843ae5d041d78e1a..97d217664c5e1a420240f7db65519e2f5598b840 100644
|
||||
index b0fabcf2435a8b89d52fbea29a20bd64e91c046c..4fd660d95a525c1ede5151adc3556e55470cc7f1 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -796,6 +796,7 @@ public abstract class PlayerList {
|
||||
@@ -800,6 +800,7 @@ public abstract class PlayerList {
|
||||
|
||||
// Paper start
|
||||
boolean isBedSpawn = false;
|
||||
@ -17,7 +17,7 @@ index 3a7fd83061b8c372c7ac8d1c843ae5d041d78e1a..97d217664c5e1a420240f7db65519e2f
|
||||
boolean isRespawn = false;
|
||||
boolean isLocAltered = false; // Paper - Fix SPIGOT-5989
|
||||
// Paper end
|
||||
@@ -816,6 +817,7 @@ public abstract class PlayerList {
|
||||
@@ -820,6 +821,7 @@ public abstract class PlayerList {
|
||||
if (optional.isPresent()) {
|
||||
BlockState iblockdata = worldserver1.getBlockState(blockposition);
|
||||
boolean flag3 = iblockdata.is(Blocks.RESPAWN_ANCHOR);
|
||||
@ -25,7 +25,7 @@ index 3a7fd83061b8c372c7ac8d1c843ae5d041d78e1a..97d217664c5e1a420240f7db65519e2f
|
||||
Vec3 vec3d = (Vec3) optional.get();
|
||||
float f1;
|
||||
|
||||
@@ -844,7 +846,7 @@ public abstract class PlayerList {
|
||||
@@ -848,7 +850,7 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
Player respawnPlayer = entityplayer1.getBukkitEntity();
|
||||
|
@ -18,10 +18,10 @@ index f81fb4c4e5d2681b16e6b6c2fb32363a312d3bff..dffb219c0abdac46320aaec168e232df
|
||||
} else {
|
||||
if (this.player.getHealth() > 0.0F) {
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 97d217664c5e1a420240f7db65519e2f5598b840..3292ef0f1fe5badcf24369c9c5f35ebfbf6d8138 100644
|
||||
index 4fd660d95a525c1ede5151adc3556e55470cc7f1..8d9d730b4fe3be9cc5965331614c3969ec4ad3f9 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -755,6 +755,12 @@ public abstract class PlayerList {
|
||||
@@ -759,6 +759,12 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
public ServerPlayer respawn(ServerPlayer entityplayer, ServerLevel worldserver, boolean flag, Location location, boolean avoidSuffocation) {
|
||||
@ -34,7 +34,7 @@ index 97d217664c5e1a420240f7db65519e2f5598b840..3292ef0f1fe5badcf24369c9c5f35ebf
|
||||
entityplayer.stopRiding(); // CraftBukkit
|
||||
this.players.remove(entityplayer);
|
||||
this.playersByName.remove(entityplayer.getScoreboardName().toLowerCase(java.util.Locale.ROOT)); // Spigot
|
||||
@@ -846,7 +852,7 @@ public abstract class PlayerList {
|
||||
@@ -850,7 +856,7 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
Player respawnPlayer = entityplayer1.getBukkitEntity();
|
||||
|
@ -434,10 +434,10 @@ index c5788a4f0acdd44d55446fd729311db7e72c0d86..db44aa972afa0e6d65c54c35382235c3
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 3292ef0f1fe5badcf24369c9c5f35ebfbf6d8138..5d6fb0ccf91a64bef15f6d4fa740ab6eab83c395 100644
|
||||
index 8d9d730b4fe3be9cc5965331614c3969ec4ad3f9..27c0e71fefb87b4bd987e371c33ef31c8706feaf 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -664,7 +664,7 @@ public abstract class PlayerList {
|
||||
@@ -668,7 +668,7 @@ public abstract class PlayerList {
|
||||
while (iterator.hasNext()) {
|
||||
entityplayer = (ServerPlayer) iterator.next();
|
||||
this.save(entityplayer); // CraftBukkit - Force the player's inventory to be saved
|
||||
@ -446,7 +446,7 @@ index 3292ef0f1fe5badcf24369c9c5f35ebfbf6d8138..5d6fb0ccf91a64bef15f6d4fa740ab6e
|
||||
}
|
||||
|
||||
// Instead of kicking then returning, we need to store the kick reason
|
||||
@@ -1300,8 +1300,8 @@ public abstract class PlayerList {
|
||||
@@ -1304,8 +1304,8 @@ public abstract class PlayerList {
|
||||
// Paper end
|
||||
// CraftBukkit start - disconnect safely
|
||||
for (ServerPlayer player : this.players) {
|
||||
|
@ -59,10 +59,10 @@ index 44b284bd3f7964685ec43c4f01d38f151a2abbd0..81a9a624e949ad4ac70e554a625837d0
|
||||
this.server.getPlayerList().broadcastSystemMessage(PaperAdventure.asVanilla(quitMessage), false);
|
||||
// Paper end
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 5d6fb0ccf91a64bef15f6d4fa740ab6eab83c395..6732334be2da794164558b88fbb3e9d38c43a92b 100644
|
||||
index 27c0e71fefb87b4bd987e371c33ef31c8706feaf..5f05e832a74a80f7a79b67ec18e269e4241089b9 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -550,6 +550,11 @@ public abstract class PlayerList {
|
||||
@@ -554,6 +554,11 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
public net.kyori.adventure.text.Component remove(ServerPlayer entityplayer) { // Paper - return Component
|
||||
@ -74,7 +74,7 @@ index 5d6fb0ccf91a64bef15f6d4fa740ab6eab83c395..6732334be2da794164558b88fbb3e9d3
|
||||
ServerLevel worldserver = entityplayer.getLevel();
|
||||
|
||||
entityplayer.awardStat(Stats.LEAVE_GAME);
|
||||
@@ -560,7 +565,7 @@ public abstract class PlayerList {
|
||||
@@ -564,7 +569,7 @@ public abstract class PlayerList {
|
||||
entityplayer.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.DISCONNECT); // Paper
|
||||
}
|
||||
|
||||
|
@ -89,10 +89,10 @@ index af8af6bb44b84c74553068b6cd64f4e3941d4ae1..bc6ddf50bcd2f38be8c8fa064b49a736
|
||||
|
||||
public void trackChunk(ChunkPos chunkPos, Packet<?> chunkDataPacket) {
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 6732334be2da794164558b88fbb3e9d38c43a92b..399d5c1147b1cdacf571aa3cd5840af6f6e55374 100644
|
||||
index 5f05e832a74a80f7a79b67ec18e269e4241089b9..d84b976364b0ffc4b7356c6791d70f0e34deff48 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -840,13 +840,13 @@ public abstract class PlayerList {
|
||||
@@ -844,13 +844,13 @@ public abstract class PlayerList {
|
||||
f1 = (float) Mth.wrapDegrees(Mth.atan2(vec3d1.z, vec3d1.x) * 57.2957763671875D - 90.0D);
|
||||
}
|
||||
|
||||
|
@ -47,10 +47,10 @@ index 595779cfd0ee1c405d7936f00a7cae1706125e7f..ed3af916dfa875dd0a5f1e730d20d11e
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 399d5c1147b1cdacf571aa3cd5840af6f6e55374..299676157b16ed9e93f5cf9804ab75514b694f49 100644
|
||||
index d84b976364b0ffc4b7356c6791d70f0e34deff48..9f73627c20d341afc57f287019e40bbbe574733e 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -241,7 +241,7 @@ public abstract class PlayerList {
|
||||
@@ -245,7 +245,7 @@ public abstract class PlayerList {
|
||||
String s1 = "local";
|
||||
|
||||
if (connection.getRemoteAddress() != null) {
|
||||
|
@ -1202,10 +1202,10 @@ index d9719e544261b9d2dc85fa9936ae23ea8e8dd08c..5afb17ccc16e614e91ff3cad2f714b4a
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 299676157b16ed9e93f5cf9804ab75514b694f49..0f380a7045f89bc383e4eb3d93c1be3885def712 100644
|
||||
index 9f73627c20d341afc57f287019e40bbbe574733e..85d5efe606f71d729fb1b1271d661b205a0ae324 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -881,7 +881,7 @@ public abstract class PlayerList {
|
||||
@@ -885,7 +885,7 @@ public abstract class PlayerList {
|
||||
// CraftBukkit end
|
||||
|
||||
worldserver1.getChunkSource().addRegionTicket(net.minecraft.server.level.TicketType.POST_TELEPORT, new net.minecraft.world.level.ChunkPos(location.getBlockX() >> 4, location.getBlockZ() >> 4), 1, entityplayer.getId()); // Paper
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Validate usernames
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
index 69498183a7637cd2dbb859c670e661f8722a090f..5df657555439e07d5fb67db8c82246c15676850d 100644
|
||||
index ed3af916dfa875dd0a5f1e730d20d11efd6419c6..cd4e76fe5b79c7d9e615b4886a568c74db757436 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
@@ -60,6 +60,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
@ -56,10 +56,10 @@ index 69498183a7637cd2dbb859c670e661f8722a090f..5df657555439e07d5fb67db8c82246c1
|
||||
|
||||
if (gameprofile != null && packet.name().equalsIgnoreCase(gameprofile.getName())) {
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 0f380a7045f89bc383e4eb3d93c1be3885def712..32c8218048fe61c58d78175d50f3d48413ddda6f 100644
|
||||
index 85d5efe606f71d729fb1b1271d661b205a0ae324..7b3b5a9bd7bfdec08998f75026fe8d3b8a2a9a42 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -659,7 +659,7 @@ public abstract class PlayerList {
|
||||
@@ -663,7 +663,7 @@ public abstract class PlayerList {
|
||||
|
||||
for (int i = 0; i < this.players.size(); ++i) {
|
||||
entityplayer = (ServerPlayer) this.players.get(i);
|
||||
|
@ -10,10 +10,10 @@ so we do not need that. The client only needs the chunk it is currently in to
|
||||
be loaded to close the loading screen, so we just send an empty one.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 32c8218048fe61c58d78175d50f3d48413ddda6f..7d623070b7c2742ba298f5b60cc7f34ffd5be8a4 100644
|
||||
index 7b3b5a9bd7bfdec08998f75026fe8d3b8a2a9a42..024b395f7f0cb68dda32f814fc7eef2a07b57eba 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -382,6 +382,16 @@ public abstract class PlayerList {
|
||||
@@ -386,6 +386,16 @@ public abstract class PlayerList {
|
||||
|
||||
// Paper start - move vehicle into method so it can be called above - short circuit around that code
|
||||
onPlayerJoinFinish(player, worldserver1, s1);
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Use username instead of display name in
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 7d623070b7c2742ba298f5b60cc7f34ffd5be8a4..fc404bc963fbe510b81d2317d694e30c71f23eb0 100644
|
||||
index 024b395f7f0cb68dda32f814fc7eef2a07b57eba..377093456d4e701a6fcfb9ed053acbfdb6247cf4 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1416,7 +1416,7 @@ public abstract class PlayerList {
|
||||
@@ -1420,7 +1420,7 @@ public abstract class PlayerList {
|
||||
// CraftBukkit start
|
||||
public ServerStatsCounter getPlayerStats(ServerPlayer entityhuman) {
|
||||
ServerStatsCounter serverstatisticmanager = entityhuman.getStats();
|
||||
|
@ -66,7 +66,7 @@ index a276aed4821eb992e0f20e2d2c6229e0b96eef73..ff7ba7a161cfed7521354bc6e3f21ba0
|
||||
public static class DataItem<T> {
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index e5caa9cbd1444698409bb6c4e46ee4086a37ebf5..5ddb75e6f60e4a4960018055991ea087ec473beb 100644
|
||||
index f86b9e5e34aa8716a9f560c2f271936175f641b3..04386413177d0fb1338fccabf8af5746a18ef784 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2790,7 +2790,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@ -79,10 +79,10 @@ index e5caa9cbd1444698409bb6c4e46ee4086a37ebf5..5ddb75e6f60e4a4960018055991ea087
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index fc404bc963fbe510b81d2317d694e30c71f23eb0..3793cc8a2cc917ba33b18c5af7fac25e9c1da288 100644
|
||||
index 377093456d4e701a6fcfb9ed053acbfdb6247cf4..f09fe42ecf1660f1ee1cdaa632d387cc5f736150 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -357,7 +357,7 @@ public abstract class PlayerList {
|
||||
@@ -361,7 +361,7 @@ public abstract class PlayerList {
|
||||
((ServerLevel)player.level).getChunkSource().chunkMap.addEntity(player); // Paper - track entity now
|
||||
// CraftBukkit end
|
||||
|
||||
|
@ -18,10 +18,10 @@ index afcdd85d2b10bbd76c589c419feefd87f3ea1825..2d8488b9aa088b6d5f0c7e557b8ad0b2
|
||||
});
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 3793cc8a2cc917ba33b18c5af7fac25e9c1da288..c0c14766adaac855112f85a203a6163b8adfdded 100644
|
||||
index f09fe42ecf1660f1ee1cdaa632d387cc5f736150..a1096ea424c0724af93a2dc65512ee71f4a0bf72 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -303,7 +303,7 @@ public abstract class PlayerList {
|
||||
@@ -307,7 +307,7 @@ public abstract class PlayerList {
|
||||
player.sendServerStatus(serverping);
|
||||
}
|
||||
|
||||
@ -30,7 +30,7 @@ index 3793cc8a2cc917ba33b18c5af7fac25e9c1da288..c0c14766adaac855112f85a203a6163b
|
||||
this.players.add(player);
|
||||
this.playersByName.put(player.getScoreboardName().toLowerCase(java.util.Locale.ROOT), player); // Spigot
|
||||
this.playersByUUID.put(player.getUUID(), player);
|
||||
@@ -339,6 +339,7 @@ public abstract class PlayerList {
|
||||
@@ -343,6 +343,7 @@ public abstract class PlayerList {
|
||||
// CraftBukkit start - sendAll above replaced with this loop
|
||||
ClientboundPlayerInfoUpdatePacket packet = ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(player));
|
||||
|
||||
@ -38,7 +38,7 @@ index 3793cc8a2cc917ba33b18c5af7fac25e9c1da288..c0c14766adaac855112f85a203a6163b
|
||||
for (int i = 0; i < this.players.size(); ++i) {
|
||||
ServerPlayer entityplayer1 = (ServerPlayer) this.players.get(i);
|
||||
|
||||
@@ -346,12 +347,17 @@ public abstract class PlayerList {
|
||||
@@ -350,12 +351,17 @@ public abstract class PlayerList {
|
||||
entityplayer1.connection.send(packet);
|
||||
}
|
||||
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren