Get potion effect from potion itemstack

Discussion in 'Plugin Development' started by willeb96, Jul 30, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    willeb96

    potionMeta.getCustomEffects() returns an empty arraylist.
    potionMeta.setMainEffect(PotionEffectType arg0) is there.
    potionMeta.getMainEffect() is not there.
     
  2. Offline

    Tomskied

    Code:java
    1. ItemStack stack = //... your stack
    2. Collection<PotionEffect> fx = Potion.fromItemStack(stack).getEffects();

    willeb96
     
  3. Offline

    willeb96

    Tomskied Thanks dude, really helpful! :D
     
  4. Offline

    Tomskied

    No worries! Make sure to check its a potion first!
     
Thread Status:
Not open for further replies.

Share This Page