mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-23 05:36:46 +01:00
Deal with the ConcurrentModification issue. Fixes #873
This commit is contained in:
parent
3cf01cb6f3
commit
ca51b2f70f
@ -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<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);
|
||||
|
Loading…
Reference in New Issue
Block a user