mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
Fix a ConcurrentModificationException
This commit is contained in:
parent
c61e710341
commit
9c09c168f8
@ -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<Party>(PartyManager.getParties())) {
|
||||
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