Help With Effects

Discussion in 'Spigot Plugin Development' started by Snowmite, Jun 26, 2016.

  1. I am trying to play an effect when a player runs a command. The effect is of a red wool being broken, and it plays the effect it's just the effect is purple and it's not the effect that you get when you break a block.

    The effect that I am trying to play:
    http://i.imgur.com/53FUzzW.png

    My Code:

    Code (Text):
      public void play (Player player) {
        for(Player all : Bukkit.getOnlinePlayers ()) {
         all.playEffect (player.getLocation ().add (0, 1.0, 0), Effect.TILE_BREAK, new MaterialData (Material.WOOL, DyeColor.RED.getWoolData ()));
         all.playEffect (player.getLocation ().add (0, 1.0, 0), Effect.TILE_BREAK, new MaterialData (Material.WOOL, DyeColor.GREEN.getWoolData ()));
        }
      }
     
  2. I tried normal Material but that didn't work either.
     
  3. Code (Text):
      public void play (Player player) {
        for(Player all : Bukkit.getOnlinePlayers ()) {
         all.playEffect (player.getLocation ().add (0, 1.0, 0), Effect.TILE_BREAK, new MaterialData (Material.WOOL, DyeColor.RED.getWoolData ()));
         all.playEffect (player.getLocation ().add (0, 1.0, 0), Effect.TILE_BREAK, new MaterialData (Material.WOOL, DyeColor.GREEN.getWoolData ()));
        }
      }
    why put an input of a player and then do all#playEffect?
    use
    world#playEffect
    [​IMG]
    EDIT - Okay, but use world#playEffect, everyone can see that one
     
  4. Because, if I just do player.playEffect, all the players don't see it.
     
  5. @Endermitey are you trying to get the particles name that gives that effect?
     
  6. I am trying to know how to play it.. Colored red wool break effect.