mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 15:49:00 +01:00
1f9d65d57c
Closes GH-8
25 lines
No EOL
1.2 KiB
Diff
25 lines
No EOL
1.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
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
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
|
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
|
@@ -0,0 +0,0 @@ public abstract class PlayerList {
|
|
}
|
|
|
|
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
|
|
|
|
}
|
|
|
|
--
|