Potions?

Discussion in 'Plugin Development' started by monkeymanboy, Sep 13, 2013.

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

    monkeymanboy

    I want to have a way to add custom potion effects to a potion what I mean is like water breathing 5 or something like that how would I do that?
     
  2. Offline

    Vexil

    Code:java
    1. player.addPotionEffect(new PotionEffect(PotionEffectType.WATER_BREATHING, amplifier, length-in-ticks));
     
  3. Offline

    monkeymanboy

    BenCS_ No, I mean adding the potion effect to a held potion
     
  4. Offline

    Loogeh

    monkeymanboy There's something called attributes. I don't know what they are/do but that might be how you would do it but another way could be renaming the potion and the on PlayerItemConsumeEvent you would check if the name is for example 'Potion of Breathing V' and if it is, then add Breathing 5 to the player by doing what BenCS_ said
     
  5. Offline

    monkeymanboy

Thread Status:
Not open for further replies.

Share This Page