Package org.bukkit.potion

Examples of org.bukkit.potion.PotionEffect


    catch (NumberFormatException e) {  }

    try { amplifier = Integer.parseInt(element.getAttributeValue("level")) - 1; }
    catch (NumberFormatException e) {  }

    return new PotionEffect(type, duration, amplifier);
  }
View Full Code Here


    return names;
  }
 
  public static short guessData(final ThrownPotion p) {
    if (p.getEffects().size() == 1) {
      final PotionEffect e = p.getEffects().iterator().next();
      final Potion d = new Potion(PotionType.getByEffect(e.getType())).splash();
      return d.toDamageValue();
    }
    return 0;
  }
View Full Code Here

              duration += eff.getDuration();
              break;
            }
          }
        }
        en.addPotionEffect(new PotionEffect(t, duration, a), true);
      }
    }
  }
View Full Code Here

            if (pe.getType() != PotionEffectType.POISON)
              continue;
            d += pe.getDuration();
          }
        }
        le.addPotionEffect(new PotionEffect(PotionEffectType.POISON, d, 0), true);
      } else {
        le.removePotionEffect(PotionEffectType.POISON);
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.bukkit.potion.PotionEffect

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.