Remove unused (but memory leaking) static field from ProtectionAbility
@@ -29,7 +29,6 @@ public class ProtectionAbility extends StaticAbility {
protected boolean removeAuras;
protected boolean removeEquipment;
protected boolean doesntRemoveControlled;
- protected static List<ObjectColor> colors = new ArrayList<>();
protected UUID auraIdNotToBeRemoved; // defines an Aura objectId that will not be removed from this protection ability
public ProtectionAbility(Filter filter) {
@@ -53,15 +52,12 @@ public class ProtectionAbility extends StaticAbility {
public static ProtectionAbility from(ObjectColor color) {
FilterObject filter = new FilterObject(getFilterText(color));
filter.add(new ColorPredicate(color));
- colors.add(color);
return new ProtectionAbility(filter);
}
public static ProtectionAbility from(ObjectColor color1, ObjectColor color2) {
FilterObject filter = new FilterObject(color1.getDescription() + " and from " + color2.getDescription());
filter.add(Predicates.or(new ColorPredicate(color1), new ColorPredicate(color2)));
- colors.add(color1);
- colors.add(color2);
return new ProtectionAbility(filter);
}
@@ -171,10 +167,6 @@ public class ProtectionAbility extends StaticAbility {
return doesntRemoveControlled;
}
- public List<ObjectColor> getColors() {
- return colors;
- }
-
public UUID getAuraIdNotToBeRemoved() {
return auraIdNotToBeRemoved;
}
