Ejemplo n.º 1
0
 @Override
 public CraftMetaPotion clone() {
   CraftMetaPotion clone = (CraftMetaPotion) super.clone();
   if (this.customEffects != null) {
     clone.customEffects = new ArrayList<PotionEffect>(this.customEffects);
   }
   return clone;
 }
Ejemplo n.º 2
0
 CraftMetaPotion(CraftMetaItem meta) {
   super(meta);
   if (!(meta instanceof CraftMetaPotion)) {
     return;
   }
   CraftMetaPotion potionMeta = (CraftMetaPotion) meta;
   if (potionMeta.hasCustomEffects()) {
     this.customEffects = new ArrayList<PotionEffect>(potionMeta.customEffects);
   }
 }
Ejemplo n.º 3
0
  @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;
  }