Indefinite PotionEffect

Discussion in 'Plugin Development' started by ChrisixStudios, Sep 1, 2013.

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

    ChrisixStudios

    I would like to add a PotionEffect to a player but have the duration be indefinite. Any thoughts?
     
  2. Offline

    Drkmaster83

    If you set the PotionEffect duration to something around an hour or more, it will make it **:**, which is infinite as far as I know.
     
  3. Offline

    ChrisixStudios

    Alright, thanks!
     
  4. Offline

    xxMOxMOxx

    Setting the duration to Integer.MAX_VALUE will make it the largest integer that Java can handle. It will last well over a year
     
Thread Status:
Not open for further replies.

Share This Page