From 0f16c987f048b5f11c9d6ba9488d641044ae654c Mon Sep 17 00:00:00 2001 From: Ka0rX Date: Sun, 19 Mar 2023 18:20:56 +0100 Subject: [PATCH] Bug Fix --- .../java/net/Indyuce/mmocore/api/player/PlayerData.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/MMOCore-API/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java b/MMOCore-API/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java index 37bfc58a..9224c564 100644 --- a/MMOCore-API/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java +++ b/MMOCore-API/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java @@ -233,14 +233,12 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc } public void resetTriggerStats() { - Iterator stat_ite=mmoData.getStatMap().getInstances().iterator(); - while(stat_ite.hasNext()) { - StatInstance instance=stat_ite.next(); + for(StatInstance instance:mmoData.getStatMap().getInstances()) { Iterator iter = instance.getModifiers().iterator(); while (iter.hasNext()) { StatModifier modifier = iter.next(); if (modifier.getKey().startsWith(StatTrigger.TRIGGER_PREFIX)) - modifier.unregister(mmoData); + iter.remove(); } } }