Potion colour effects not working?

Discussion in 'Plugin Development' started by zzienzz, May 25, 2016.

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

    zzienzz

    I used to be able to use

    Code:
    player.getLocation().getWorld().playEffect(player.getLocation(), Effect.POTION_BREAK, 5);
    And it would play the potion break effect, with the number changing the colour. So 5 would say be blue, 11 might be red, 15 green, etc.

    As of 1.9 I can't do this anymore. All numbers are now blue. Is there a way to fix this? I really want the red, green, orange etc colours back.
     
  2. Offline

    redtsch

    @zzienzz
    I didn't know you could do this!
    But have you tried RGB colors? Or Hex codes?
     
  3. Offline

    zzienzz

    desperately need a fix for this

    How would i got about using rgb or hex?
     
  4. Offline

    I Al Istannen

    @zzienzz
    Printing out the data needed for the effect using
    "System.out.println(Effect.POTION_BREAK.getData());"
    prints:
    "class org.bukkit.potion.Potion".

    Try to pass it a potion instead of a number.
    BEWARE: I printed that with a 1.8 jar. Do it again for yourself with your 1.9 one!
     
Thread Status:
Not open for further replies.

Share This Page