Permalink
Browse files

Deal with the ConcurrentModification issue. Fixes #873

  • Loading branch information...
1 parent 3cf01cb commit ca51b2f70f484877e466dcef4c6639bda82623d0 @TfT-02 TfT-02 committed Mar 26, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/main/java/com/gmail/nossr50/runnables/party/PartyAutoKickTask.java
View
4 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 @@ private void updatePartyMembers() {
for (Iterator<Party> partyIterator = PartyManager.getParties().iterator(); partyIterator.hasNext();) {
Party party = partyIterator.next();
- for (Iterator<OfflinePlayer> memberIterator = party.getMembers().iterator(); memberIterator.hasNext();) {
- OfflinePlayer member = memberIterator.next();
+ for (OfflinePlayer member : new ArrayList<OfflinePlayer>(party.getMembers())) {
if (currentTime - member.getLastPlayed() > kickTime) {
PartyManager.removeFromParty(member, party);

0 comments on commit ca51b2f

Please sign in to comment.