Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 04:20:04 +01:00
3faaaab75d
Some pretty micro optimizations, but this is the hottest method in the server.... This will drastically reduce number of operations to perform getType the 2 previous patches was squashed into 1
28 Zeilen
1.1 KiB
Diff
28 Zeilen
1.1 KiB
Diff
From 9ca0316efd9a773e426f3327a6e2cd14c9d6aa86 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 540e178..5ff5017 100644
|
|
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
|
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
|
@@ -1296,9 +1296,11 @@ 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
|
|
|
|
}
|
|
|
|
--
|
|
2.9.0
|
|
|