2016-06-25 19:19:04 +02:00
|
|
|
From 7831132f199ac9b62f9403905bf5becf3824d51a Mon Sep 17 00:00:00 2001
|
2016-04-13 23:02:59 +02:00
|
|
|
From: Jedediah Smith <jedediah@silencegreys.com>
|
|
|
|
Date: Tue, 29 Mar 2016 20:19:20 -0400
|
|
|
|
Subject: [PATCH] Fix some players not being kicked on shutdown
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
2016-06-25 19:19:04 +02:00
|
|
|
index 9865c4b..e6a4490 100644
|
2016-04-13 23:02:59 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
2016-06-25 19:19:04 +02:00
|
|
|
@@ -1297,9 +1297,11 @@ public abstract class PlayerList {
|
2016-04-13 23:02:59 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public void u() {
|
|
|
|
- for (int i = 0; i < this.players.size(); ++i) {
|
|
|
|
- ((EntityPlayer) this.players.get(i)).playerConnection.disconnect(this.server.server.getShutdownMessage()); // CraftBukkit - add custom shutdown message
|
|
|
|
+ // Paper start - Fix players being skipped due to concurrent list modification
|
|
|
|
+ for (EntityPlayer player : com.google.common.collect.ImmutableList.copyOf(this.players)) {
|
|
|
|
+ player.playerConnection.disconnect(this.server.server.getShutdownMessage()); // CraftBukkit - add custom shutdown message
|
|
|
|
}
|
|
|
|
+ // Paper end
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
--
|
2016-06-23 04:18:41 +02:00
|
|
|
2.9.0
|
2016-04-13 23:02:59 +02:00
|
|
|
|