fixed clearing temporary effects while rollbacks

This commit is contained in:
18ths 2020-06-23 17:26:05 +02:00
parent 028ea0e04c
commit 5b9135ef71

View file

@ -210,7 +210,7 @@ public class ContinuousEffectsList<T extends ContinuousEffect> extends ArrayList
public void removeEffects(UUID effectIdToRemove, Set<Ability> abilitiesToRemove) {
Set<Ability> abilities = effectAbilityMap.get(effectIdToRemove);
if (abilitiesToRemove != null && abilities != null) {
abilities.removeAll(abilitiesToRemove);
abilities.removeIf(ability -> abilitiesToRemove.stream().anyMatch(a -> a.isSameInstance(ability)));
}
if (abilities == null || abilities.isEmpty()) {
for (Iterator<T> iterator = this.iterator(); iterator.hasNext();) {