From ca51b2f70f484877e466dcef4c6639bda82623d0 Mon Sep 17 00:00:00 2001 From: TfT_02 Date: Tue, 26 Mar 2013 15:18:06 +0100 Subject: [PATCH] Deal with the ConcurrentModification issue. Fixes #873 --- .../com/gmail/nossr50/runnables/party/PartyAutoKickTask.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/runnables/party/PartyAutoKickTask.java b/src/main/java/com/gmail/nossr50/runnables/party/PartyAutoKickTask.java index 432615862..ae30c9bc3 100644 --- a/src/main/java/com/gmail/nossr50/runnables/party/PartyAutoKickTask.java +++ b/src/main/java/com/gmail/nossr50/runnables/party/PartyAutoKickTask.java @@ -1,5 +1,6 @@ package com.gmail.nossr50.runnables.party; +import java.util.ArrayList; import java.util.Iterator; import org.bukkit.OfflinePlayer; @@ -22,8 +23,7 @@ public class PartyAutoKickTask extends BukkitRunnable { for (Iterator partyIterator = PartyManager.getParties().iterator(); partyIterator.hasNext();) { Party party = partyIterator.next(); - for (Iterator memberIterator = party.getMembers().iterator(); memberIterator.hasNext();) { - OfflinePlayer member = memberIterator.next(); + for (OfflinePlayer member : new ArrayList(party.getMembers())) { if (currentTime - member.getLastPlayed() > kickTime) { PartyManager.removeFromParty(member, party);