Sound Effects

Discussion in 'Plugin Development' started by Beans, Aug 12, 2012.

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

    Beans

    i have been trying to add the Blaze_Shoot sound when a player teleports inside the teleport even, but i cannot figure this out for the life of me. Here is my event.

    Code:
    public void onPlayerTeleport(PlayerTeleportEvent event) {
            final Player player = event.getPlayer();
           
            if(event.getCause() == TeleportCause.COMMAND) {
                if (player.hasPermission("NinjaTP.Smoke") && ninjas.containsKey(player.getName()) && ninjas.get(player.getName()))
                    for (int i = 0; i <= 20; i++){
                    player.getWorld().playEffect(player.getLocation(), Effect.SMOKE, 4, 16);
                    player.getWorld().playEffect(player.getLocation(), Effect.ENDER_SIGNAL, 4, 16);
                }
                            player.getWorld().playEffect(player.getLocation(), Effect.BLAZE_SHOOT, 0, 50);
    so all the other stuff works, like the smoke and the Ender signal, but the sound is not playing. can someone help me please?
     
  2. Offline

    Firefly

    Your missing a ton of brackets. Might be the problem.
     
  3. Offline

    lordaragos

    try this?
     
  4. Offline

    Beans

    oh no! i just didnt copy that. sorry! :p i do have that and still doesnt work. if i was missing that many brakets, it wouldnt let me export.
     
  5. Offline

    Firefly

    Your missing a bracket at the end of the second if-statement.
     
  6. Offline

    lordaragos

    Alright so its not a bracket problem....try actually recreating it and not just have the Effect play....I honestly haven't played with these much
     
Thread Status:
Not open for further replies.

Share This Page