diff --git a/src/main/java/com/gmail/nossr50/party/runnables/PartyAutoKick.java b/src/main/java/com/gmail/nossr50/party/runnables/PartyAutoKick.java index 56e5ebfa0..aff2886bc 100644 --- a/src/main/java/com/gmail/nossr50/party/runnables/PartyAutoKick.java +++ b/src/main/java/com/gmail/nossr50/party/runnables/PartyAutoKick.java @@ -1,5 +1,7 @@ package com.gmail.nossr50.party.runnables; +import java.util.ArrayList; + import org.bukkit.OfflinePlayer; import com.gmail.nossr50.config.Config; @@ -16,8 +18,8 @@ public class PartyAutoKick implements Runnable { long currentTime = System.currentTimeMillis(); long kickTime = 24L * 60L * 60L * 1000L * Config.getInstance().getAutoPartyKickTime(); - for (Party party : PartyManager.getParties()) { - for (OfflinePlayer member : party.getMembers()) { + for (Party party : new ArrayList(PartyManager.getParties())) { + for (OfflinePlayer member : new ArrayList(party.getMembers())) { if (currentTime - member.getLastPlayed() > kickTime) { PartyManager.removeFromParty(member, party); }