Examples of playSound()


Examples of net.minecraft.entity.passive.EntitySquid.playSound()

                squid.motionX = randXmotion;
                squid.motionY = randYmotion;
                squid.motionZ = randZmotion;
                world.spawnEntityInWorld(squid);
                squid.spawnExplosionParticle();
                squid.playSound("mob.newsound.chickenplop", 0.2F, ((rand.nextFloat() - rand.nextFloat()) * 0.7F + 1.0F) * 2.0F);
                world.setBlockMetadataWithNotify(x, y, z, 11, 3);
            }
        } else {
            world.setBlockMetadataWithNotify(x, y, z, 14, 2);
            world.scheduleBlockUpdate(x, y, z, this, 60);
View Full Code Here

Examples of net.minecraft.entity.player.EntityPlayer.playSound()

     
    EntityPlayer ep = ctx.getServerHandler().playerEntity;

    ep.worldObj.playSoundEffect(ep.posX, ep.posY, ep.posZ, "mob.endermen.portal", 1.0F, 1.0F);

    ep.playSound("mob.endermen.portal", 1.0F, 1.0F);

    ep.setPositionAndUpdate(message.x + 0.5, message.y + 1.1, message.z + 0.5);

    ep.worldObj.playSoundEffect(message.x, message.y, message.z, "mob.endermen.portal", 1.0F, 1.0F);
    ep.fallDistance = 0;
View Full Code Here

Examples of net.minecraft.src.SoundManager.playSound()

        if (soundId > -1 && soundId <= SoundEffect.getMaxId()) {
          SoundEffect effect = SoundEffect.getSoundEffectFromId(soundId);
          if (!location) {
            sndManager.playSoundFX(effect.getName(), 0.5F, 0.7F, effect.getVariationId(), volume / 100F);
          } else {
            sndManager.playSound(effect.getName(), x, y, z, 0.5F, (distance / 16F), effect.getVariationId(), volume / 100F);
          }
        }
        soundId -= (1 + SoundEffect.getMaxId());
        if (soundId > -1 && soundId <= Music.getMaxId()) {
          Music music = Music.getMusicFromId(soundId);
View Full Code Here

Examples of org.bukkit.World.playSound()

        if (globalEffectsEnabled) {
            world.strikeLightningEffect(location);
            world.strikeLightningEffect(location);
            world.strikeLightningEffect(location);

            world.playSound(location, Sound.GHAST_SCREAM, Misc.GHAST_VOLUME, Misc.getGhastPitch());
            mcMMO.p.getServer().broadcastMessage(ChatColor.RED + AdvancedConfig.getInstance().getServerUnleashMessage().replace("(PLAYER)", player.getDisplayName()));
        }
        else {
            world.createExplosion(location.getX(), location.getY(), location.getZ(), 0F, false, false);
            world.createExplosion(location.getX(), location.getY(), location.getZ(), 0F, false, false);
View Full Code Here

Examples of org.bukkit.entity.Player.playSound()

      return;
    }
    // Prevent thieves from taking their bomb/wool/cake into a chest, etc.
    if (zone.isThief(player.getName())) {
      event.setCancelled(true);
      player.playSound(player.getLocation(), Sound.FIZZ, 10, 10);
    } else // Magically give player a wool block when they click their helmet
      if (event.getSlotType() == InventoryType.SlotType.ARMOR && event.getSlot() == 39
        && zone.getWarzoneConfig().getBoolean(WarzoneConfig.BLOCKHEADS)) {
      ItemStack teamBlock = zone.getPlayerTeam(player.getName()).getKind().getBlockHead();
      player.getInventory().remove(teamBlock.getType());
View Full Code Here

Examples of org.bukkit.entity.Player.playSound()

    if (zone == null) {
      return;
    }
    if (zone.isImportantBlock(event.getBlockClicked())) {
      event.setCancelled(true);
      player.playSound(player.getLocation(), Sound.FIZZ, 10, 10);
    }
  }
}
View Full Code Here

Examples of org.bukkit.entity.Player.playSound()

        event.setCancelled(true);
        // Replace message with sound to reduce spamminess.
        // Whenever a player dies in the middle of conflict they will
        // likely respawn still trying to use their items to attack
        // another player.
        player.playSound(player.getLocation(), Sound.ITEM_BREAK, 1, 0);
      }

      if (zone != null && event.getAction() == Action.RIGHT_CLICK_BLOCK && event.getClickedBlock().getType() == Material.ENDER_CHEST && !zone.getWarzoneConfig().getBoolean(WarzoneConfig.ALLOWENDER)) {
        event.setCancelled(true);
        War.war.badMsg(player, "use.ender");
View Full Code Here

Examples of org.bukkit.entity.Player.playSound()

         * TREE FELLER SOUNDS
         *
         * We don't need to check permissions here because they've already been checked for the ability to even activate.
         */
        if (mcMMOPlayer.getAbilityMode(AbilityType.TREE_FELLER) && BlockUtils.isLog(blockState) && Config.getInstance().getTreeFellerSoundsEnabled()) {
            player.playSound(blockState.getLocation(), Sound.FIZZ, Misc.FIZZ_VOLUME, Misc.getFizzPitch());
        }
    }

    /**
     * Handle BlockDamage events where the event is modified.
View Full Code Here

Examples of org.bukkit.entity.Player.playSound()

            }
        }
        else if (mcMMOPlayer.getAbilityMode(AbilityType.BERSERK) && heldItem.getType() == Material.AIR) {
            if (AbilityType.BERSERK.blockCheck(block.getState()) && EventUtils.simulateBlockBreak(block, player, true)) {
                event.setInstaBreak(true);
                player.playSound(block.getLocation(), Sound.ITEM_PICKUP, Misc.POP_VOLUME, Misc.getPopPitch());
            }
            else if (mcMMOPlayer.getUnarmedManager().canUseBlockCracker() && BlockUtils.affectedByBlockCracker(blockState) && EventUtils.simulateBlockBreak(block, player, true)) {
                if (mcMMOPlayer.getUnarmedManager().blockCrackerCheck(blockState)) {
                    blockState.update();
                }
View Full Code Here

Examples of org.bukkit.entity.Player.playSound()

                }
            }
        }
        else if (mcMMOPlayer.getWoodcuttingManager().canUseLeafBlower(heldItem) && BlockUtils.isLeaves(blockState) && EventUtils.simulateBlockBreak(block, player, true)) {
            event.setInstaBreak(true);
            player.playSound(blockState.getLocation(), Sound.ITEM_PICKUP, Misc.POP_VOLUME, Misc.getPopPitch());
        }
    }
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.