Infinite Potion Duration

Discussion in 'Plugin Development' started by RickRaider, May 25, 2013.

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

    RickRaider

    Anybody know of an algorithm that sets the player's potion effect duration to infinity?
     
  2. Offline

    BroTotal

    Yep Here ya go. make sure you replace spaces for the _ mark

    Code:
        player.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, 
          10000000, 0));
     
  3. Offline

    Tzeentchful

    RickRaider
    If you put the max value an integer can be (2 billion) it will show **:** to the player and it will make it last forever.
    Code:java
    1. player.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, Integer.MAX_VALUE, 0));
     
Thread Status:
Not open for further replies.

Share This Page