Solved Potion Effect Values

Discussion in 'Spigot Plugin Development' started by Sean0402, Jan 27, 2020.

Thread Status:
Not open for further replies.
  1. Hey, This is a general question, if I use this;

    Code (Java):
    for(String effects : MyStringList) {
    p.removePotionEffect(PotionEffectType.getByName(MyStringList.toUpperCase()));
    Will this automatically add support for any version or only the version I'm coding on?
     
  2. What are your imports? It should work on any version.
     
  3. I think it should be like that

    Code (Java):

    for(String effect : MyStringList) {
    p.removePotionEffect(PotionEffectType.getByName(effect.toUpperCase()));
    }
     
    But yes it must support prety much all of the newer versions.
     
Thread Status:
Not open for further replies.