2016-05-12 02:07:46 +00:00
|
|
|
From 01394f77038783cd529dd8069cbf0084e9f4a9b7 Mon Sep 17 00:00:00 2001
|
2016-04-13 21:02:59 +00: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-05-12 02:07:46 +00:00
|
|
|
index ac3bdd1..9d25312 100644
|
2016-04-13 21:02:59 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
2016-05-12 02:07:46 +00:00
|
|
|
@@ -1294,9 +1294,11 @@ public abstract class PlayerList {
|
2016-04-13 21:02:59 +00: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-05-12 02:07:46 +00:00
|
|
|
2.8.2
|
2016-04-13 21:02:59 +00:00
|
|
|
|