From f9643988221e0508ffd6c1d4090457f906a42f28 Mon Sep 17 00:00:00 2001 From: RemainingToast <59129680+RemainingToast@users.noreply.github.com> Date: Tue, 11 May 2021 17:49:39 +1000 Subject: [PATCH] Fix concurrent exception (#15) --- .../pistonqueue/bungee/listeners/QueueListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/pistonmaster/pistonqueue/bungee/listeners/QueueListener.java b/src/main/java/net/pistonmaster/pistonqueue/bungee/listeners/QueueListener.java index 32e5ccb..ebcfaf7 100644 --- a/src/main/java/net/pistonmaster/pistonqueue/bungee/listeners/QueueListener.java +++ b/src/main/java/net/pistonmaster/pistonqueue/bungee/listeners/QueueListener.java @@ -186,7 +186,7 @@ private void moveVeteran(boolean canMoveRegular) { } private void connectPlayer(QueueType type) { - for (Entry entry : type.getQueueMap().entrySet()) { + for (Entry entry : new LinkedHashMap<>(type.getQueueMap()).entrySet()) { ProxiedPlayer player = plugin.getProxy().getPlayer(entry.getKey()); if (player == null || !player.isConnected()) { continue;