Examples of playSound()


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

        if (Config.getInstance().getRepairAnvilMessagesEnabled()) {
            player.sendMessage(LocaleLoader.getString("Repair.Listener.Anvil"));
        }

        if (Config.getInstance().getRepairAnvilPlaceSoundsEnabled()) {
            player.playSound(player.getLocation(), Sound.ANVIL_LAND, Misc.ANVIL_USE_VOLUME, Misc.ANVIL_USE_PITCH);
        }

        togglePlacedAnvil();
    }
View Full Code Here

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

        // Give out XP like candy
        applyXpGain((float) ((getPercentageRepaired(startDurability, newDurability, repairable.getMaximumDurability()) * repairable.getXpMultiplier()) * ExperienceConfig.getInstance().getRepairXPBase() * ExperienceConfig.getInstance().getRepairXP(repairable.getRepairMaterialType())), XPGainReason.PVE);

        // BWONG BWONG BWONG
        if (Config.getInstance().getRepairAnvilUseSoundsEnabled()) {
            player.playSound(player.getLocation(), Sound.ANVIL_USE, Misc.ANVIL_USE_VOLUME, Misc.ANVIL_USE_PITCH);
        }

        // Repair the item!
        item.setDurability(newDurability);
    }
View Full Code Here

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

        if (!drop.hasMetadata(mcMMO.droppedItemKey) && mcMMOPlayer.inParty() && ItemUtils.isSharable(dropStack)) {
            event.setCancelled(ShareHandler.handleItemShare(drop, mcMMOPlayer));

            if (event.isCancelled()) {
                player.playSound(player.getLocation(), Sound.ITEM_PICKUP, Misc.POP_VOLUME, Misc.getPopPitch());
                return;
            }
        }

        if ((mcMMOPlayer.isUsingUnarmed() && ItemUtils.isSharable(dropStack)) || mcMMOPlayer.getAbilityMode(AbilityType.BERSERK)) {
View Full Code Here

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

            boolean pickupSuccess = Unarmed.handleItemPickup(player.getInventory(), drop);
            boolean cancel = Config.getInstance().getUnarmedItemPickupDisabled() || pickupSuccess;
            event.setCancelled(cancel);

            if (pickupSuccess) {
                player.playSound(player.getLocation(), Sound.ITEM_PICKUP, Misc.POP_VOLUME, Misc.getPopPitch());
                player.updateInventory();
                return;
            }
        }
    }
View Full Code Here

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

        if (Config.getInstance().getStatsTrackingEnabled()) {
            MetricsManager.chimeraWingUsed();
        }

        if (Config.getInstance().getChimaeraSoundEnabled()) {
            player.playSound(location, Sound.BAT_TAKEOFF, Misc.BAT_VOLUME, Misc.BAT_PITCH);
        }

        player.sendMessage(LocaleLoader.getString("Item.ChimaeraWing.Pass"));
    }
View Full Code Here

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

        if (Config.getInstance().getSalvageAnvilMessagesEnabled()) {
            player.sendMessage(LocaleLoader.getString("Salvage.Listener.Anvil"));
        }

        if (Config.getInstance().getSalvageAnvilPlaceSoundsEnabled()) {
            player.playSound(player.getLocation(), Sound.ANVIL_LAND, Misc.ANVIL_USE_VOLUME, Misc.ANVIL_USE_PITCH);
        }

        togglePlacedAnvil();
    }
View Full Code Here

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

        Misc.dropItems(location, new MaterialData(salvageable.getSalvageMaterial(), salvageMaterialMetadata).toItemStack(salvageableAmount), 1);

        // BWONG BWONG BWONG - CLUNK!
        if (Config.getInstance().getSalvageAnvilUseSoundsEnabled()) {
            player.playSound(player.getLocation(), Sound.ANVIL_USE, Misc.ANVIL_USE_VOLUME, Misc.ANVIL_USE_PITCH);
            player.playSound(player.getLocation(), Sound.ITEM_BREAK, 1.0F, 1.0F);
        }

        player.sendMessage(LocaleLoader.getString("Salvage.Skills.Success"));
    }
View Full Code Here

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

        Misc.dropItems(location, new MaterialData(salvageable.getSalvageMaterial(), salvageMaterialMetadata).toItemStack(salvageableAmount), 1);

        // BWONG BWONG BWONG - CLUNK!
        if (Config.getInstance().getSalvageAnvilUseSoundsEnabled()) {
            player.playSound(player.getLocation(), Sound.ANVIL_USE, Misc.ANVIL_USE_VOLUME, Misc.ANVIL_USE_PITCH);
            player.playSound(player.getLocation(), Sound.ITEM_BREAK, 1.0F, 1.0F);
        }

        player.sendMessage(LocaleLoader.getString("Salvage.Skills.Success"));
    }
View Full Code Here

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

            if (leader != null) {
                leader.sendMessage(LocaleLoader.getString("Party.LevelUp", levelsGained, getLevel()));

                if (Config.getInstance().getLevelUpSoundsEnabled()) {
                    leader.playSound(leader.getLocation(), Sound.LEVEL_UP, Misc.LEVELUP_VOLUME, Misc.LEVELUP_PITCH);
                }
            }
            return;
        }
View Full Code Here

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

        else {
            world.createExplosion(location.getX(), location.getY(), location.getZ(), 0F, false, false);
            world.createExplosion(location.getX(), location.getY(), location.getZ(), 0F, false, false);
            world.createExplosion(location.getX(), location.getY(), location.getZ(), 0F, false, false);

            player.playSound(location, Sound.GHAST_SCREAM, Misc.GHAST_VOLUME, Misc.getGhastPitch());
        }

        if (player.getItemInHand().getType() == Material.FISHING_ROD) {
            player.setItemInHand(null);
        }
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.