mirror of
https://github.com/PaperMC/Folia.git
synced 2024-11-21 11:55:11 +01:00
Fix player disconnect call in PlayerList removAll
This commit is contained in:
parent
5e7b4f0185
commit
3c62932250
@ -17042,7 +17042,7 @@ index 2ff578e4a953ffcf5176815ba8e3f06f73499989..2e96377d628b3a07fb565020074d665f
|
|||||||
private State() {}
|
private State() {}
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
index 0dbe182fbae5ce5ba182176eb5d5e3f1897e77f2..570eff7de267773cc3223b6722e44b388dcbd662 100644
|
index 0dbe182fbae5ce5ba182176eb5d5e3f1897e77f2..e79d96f8c6dccc2289a93a66c25df885afdc1c3f 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
|
||||||
@@ -139,7 +139,7 @@ public abstract class PlayerList {
|
@@ -139,7 +139,7 @@ public abstract class PlayerList {
|
||||||
@ -17390,11 +17390,11 @@ index 0dbe182fbae5ce5ba182176eb5d5e3f1897e77f2..570eff7de267773cc3223b6722e44b38
|
|||||||
+ // Folia start - region threading
|
+ // Folia start - region threading
|
||||||
+ // just send disconnect packet, don't modify state
|
+ // just send disconnect packet, don't modify state
|
||||||
+ for (ServerPlayer player : this.players) {
|
+ for (ServerPlayer player : this.players) {
|
||||||
+ final Component ichatbasecomponent = PaperAdventure.asVanilla(this.server.server.shutdownMessage()); // Paper - Adventure
|
+ final Component shutdownMessage = PaperAdventure.asVanilla(this.server.server.shutdownMessage()); // Paper - Adventure
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
+
|
+
|
||||||
+ player.connection.send(new net.minecraft.network.protocol.game.ClientboundDisconnectPacket(ichatbasecomponent), net.minecraft.network.PacketSendListener.thenRun(() -> {
|
+ player.connection.send(new net.minecraft.network.protocol.game.ClientboundDisconnectPacket(shutdownMessage), net.minecraft.network.PacketSendListener.thenRun(() -> {
|
||||||
+ player.connection.disconnect(ichatbasecomponent);
|
+ player.connection.connection.disconnect(shutdownMessage);
|
||||||
+ }));
|
+ }));
|
||||||
+ }
|
+ }
|
||||||
+ if (true) {
|
+ if (true) {
|
||||||
|
@ -19,7 +19,7 @@ index 2e96377d628b3a07fb565020074d665f594f32e8..75b1877f8c3e4da3183437f327ef3376
|
|||||||
} // Folia - region threading - remove delayed accept
|
} // Folia - region threading - remove delayed accept
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
index 570eff7de267773cc3223b6722e44b388dcbd662..8c2520955fec5aeb2a49910db78d6678e5e4bff3 100644
|
index e79d96f8c6dccc2289a93a66c25df885afdc1c3f..bdaca45377985abdb1f8b47df519d06a0674c4f2 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
|
||||||
@@ -177,6 +177,17 @@ public abstract class PlayerList {
|
@@ -177,6 +177,17 @@ public abstract class PlayerList {
|
||||||
|
Loading…
Reference in New Issue
Block a user