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);