playEffect with FLYING_GLYPH effect

Discussion in 'Plugin Development' started by Nixo78, Dec 21, 2015.

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

    Nixo78

    Hi !
    I got a problem when i want to playEffect() with FLYING_GLYPH
    https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Effect.html#FLYING_GLYPH
    It is in the javadoc, and when i write:

    Code:
    public void testEffect(Player p){
        p.playEffect(p.getLocation(), Effect.FLYING_GLYPH, Effect.Type.VISUAL);
        }
    Eclipse underline the line and say "FLYING_GLYPH cannot be resolved or is not a field".
    Where is the problem ?
    Thanks !
     
  2. Offline

    pie_flavor

    @Mixo78 you are sure that you have the spigot jar referenced and not a 1.7.10 bukkit one? Also, stupid question, but are you sure you have it imported?
     
  3. Offline

    Nixo78

    Then eclipse would underline the 500 lines of codes, no ? Checking that in few seconds.
    [​IMG]
    I updated my bukkit yesterday, when i tought i was maybe outdated, but, this changed nothign.
     
  4. @Nixo78 You referenced the bukkit api. The Spigot API added the glyph effect, and you're using bukkit so it's not showing up.
     
  5. Offline

    Minibros

    @Nixo78
    Code:
    public void pariticleEffect(Player player) {
    Bukkit.getServer().getWorld("world").playEffect(player.getLocation(), Effect.FLYING_GLYPH , Effect.Type.VISUAL);
    }
    
     
  6. Offline

    Nixo78

    Same error.
    Thanks ! Why it's not in the bukkit api so ?

    EDIT: No error, but particle dont display :(.

    Oh wait, the glyph effect is refferenced in the bukkit javadoc, so it should work with bukkit !

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Dec 21, 2015
  7. @Nixo78
    Spigot does not only improve performace, but it also adds in some extras to the api including the glyph thing. I don't know why it's not visible.
     
  8. Offline

    Nixo78

    It work, found why, but can't make it work for everyone, i try World.Spigot.playEffect but it's not working :(
    How i need to write this ?
     
Thread Status:
Not open for further replies.

Share This Page