@Override public CraftMetaPotion clone() { CraftMetaPotion clone = (CraftMetaPotion) super.clone(); if (this.customEffects != null) { clone.customEffects = new ArrayList<PotionEffect>(this.customEffects); } return clone; }
CraftMetaPotion(CraftMetaItem meta) { super(meta); if (!(meta instanceof CraftMetaPotion)) { return; } CraftMetaPotion potionMeta = (CraftMetaPotion) meta; if (potionMeta.hasCustomEffects()) { this.customEffects = new ArrayList<PotionEffect>(potionMeta.customEffects); } }
@Override public boolean equalsCommon(CraftMetaItem meta) { if (!super.equalsCommon(meta)) { return false; } if (meta instanceof CraftMetaPotion) { CraftMetaPotion that = (CraftMetaPotion) meta; return (this.hasCustomEffects() ? that.hasCustomEffects() && this.customEffects.equals(that.customEffects) : !that.hasCustomEffects()); } return true; }