Skip to content
This repository
Browse code

Deal with the ConcurrentModification issue. Fixes #873

  • Loading branch information...
commit ca51b2f70f484877e466dcef4c6639bda82623d0 1 parent 3cf01cb
TfT_02 TfT-02 authored
4 src/main/java/com/gmail/nossr50/runnables/party/PartyAutoKickTask.java
... ... @@ -1,5 +1,6 @@
1 1 package com.gmail.nossr50.runnables.party;
2 2
  3 +import java.util.ArrayList;
3 4 import java.util.Iterator;
4 5
5 6 import org.bukkit.OfflinePlayer;
@@ -22,8 +23,7 @@ private void updatePartyMembers() {
22 23 for (Iterator<Party> partyIterator = PartyManager.getParties().iterator(); partyIterator.hasNext();) {
23 24 Party party = partyIterator.next();
24 25
25   - for (Iterator<OfflinePlayer> memberIterator = party.getMembers().iterator(); memberIterator.hasNext();) {
26   - OfflinePlayer member = memberIterator.next();
  26 + for (OfflinePlayer member : new ArrayList<OfflinePlayer>(party.getMembers())) {
27 27
28 28 if (currentTime - member.getLastPlayed() > kickTime) {
29 29 PartyManager.removeFromParty(member, party);

0 comments on commit ca51b2f

Please sign in to comment.
Something went wrong with that request. Please try again.