Solved Resistance potion?

Discussion in 'Spigot Plugin Development' started by TheCreeperCow, Aug 13, 2017 at 9:38 AM.

Thread Status:
Not open for further replies.
  1. Hi im having a hard time adding the resistance potion to a player due to the fact addPotionEffect only takes craftable potions as parameters i would like to know how i would do this?
     
  2. I think this should work
    Code (Text):
    player.addPotionEffect(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, duration, amplifier));
     
    • Like Like x 1
  3. Be careful @TheCreeperCow, duration is the time in ticks, not in seconds :)
     
  4. Extend PotionEffect in a new class if you want to create a new effect


    Sent from my iPhone using Tapatalk
     
Thread Status:
Not open for further replies.

Share This Page