Solved How to get effect list from a player?

Discussion in 'Spigot Plugin Development' started by QAQT0T, Jul 17, 2019.

  1. Title said all.
    How to get all effect (name,duration,amplifier) from a player?
    Separate multiple effects,and let them output as String.
    I have no idea
    #1 QAQT0T, Jul 17, 2019
    Last edited: Jul 17, 2019
  2. Please, read the docs. Player#getActivePotionEffects()
  3. I don't know how to separate multiple effects.Sry,I didn't explain clearly.
  4. That method returns a collection of PotionEffect. Loop it and you have each one.
    • Agree Agree x 1
  5. Completed by myself.
    • Funny Funny x 1
  6. You should add something with the Array list.