Effect.getByName() not working properly

Discussion in 'Spigot Plugin Development' started by Mayhem777, May 8, 2015.

  1. Hi there guys! well before 1.8 i was able to use the method like:
    "Effect eff = Effect.getByName("EXPLOSION");"

    But since 1.8 no matter what i try i always get "null" for that effect, i've tried with several effects and ALL returns null, any clue? thanks!
     
  2. @Mayhem777 the particle name (which is the name that is used in getByName(String)) for EXPLOSION is "explode". If you want to lookup using "EXPLOSION", use Effect.valueOf("EXPLOSION").
     
    • Informative Informative x 2
    • Winner Winner x 1
  3. I see so to use the ENUM name i have to use "valueOf" now... thanks pal :)
     
  4. The thread that saved my life after an hour of searching.

    EDIT: Did not realize it was such an old thread! Sorry for bumping it!
     
    • Like Like x 1