Solved PotionSplashEvent : How to get duration of potion?

Discussion in 'Plugin Development' started by Ragnarok_, Apr 28, 2017.

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

    Ragnarok_

    Hello, I simply want to get the potion's duration of what was splashed. I tried doing
    Code:
    for (PotionEffect effect : ((PotionMeta) e.getPotion().getItem().getItemMeta()).getCustomEffects()) {
    But I wouldn't continue past the loop, therefore, I have nowhere to go. Please help, and thanks regards!
     
  2. Offline

    Zombie_Striker

    @Ragnarok_
    Print out the size of CustomEffects. Most likely, it is empty.
     
  3. Offline

    Ragnarok_

    Yes, it is empty. How would I get the duration then? :(
     
Thread Status:
Not open for further replies.

Share This Page