Skip to content

Instantly share code, notes, and snippets.

@rodel77
Created October 3, 2016 00:16
Show Gist options
  • Save rodel77/738928d029badd6e68497d9175441fca to your computer and use it in GitHub Desktop.
Save rodel77/738928d029badd6e68497d9175441fca to your computer and use it in GitHub Desktop.
Sound helper
package mx.com.rodel.utils;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
/**
* Sound helper enum
*
* Select one sound and play it, in 1.7/1.8/1.9/1.10
*
* @author rodel77
*/
public enum SoundHelper {
AMBIENT_CAVE("ambient_cave", "ambient.cave"),
BLOCK_ANVIL_BREAK("dig.stone", "block.anvil.break"),
BLOCK_ANVIL_DESTROY("random.anvil_break", "block.anvil.destroy"),
BLOCK_ANVIL_FALL("step.stone", "block.anvil.fall"),
BLOCK_ANVIL_HIT("step.stone", "block.anvil.hit"),
BLOCK_ANVIL_LAND("random.anvil_land", "block.anvil.land"),
BLOCK_ANVIL_PLACE("random.anvil_land", "block.anvil.place"),
BLOCK_ANVIL_STEP("step.stone", "block.anvil.step"),
BLOCK_ANVIL_USE("random.anvil_use", "block.anvil.use"),
BLOCK_BREWING_STAND_BREW("random.brup:0", "block.brewing_stand.brew"),
BLOCK_CHEST_CLOSE("random.chestopen", "block.chest.close"),
BLOCK_CHEST_LOCKED("random.door_open", "block.chest.locked"),
BLOCK_CHEST_OPEN("random.chestclosed", "block.chest.open"),
BLOCK_CHORUS_FLOWER_DEATH("step.gravel:0", "block.chorus_flower.death"),
BLOCK_CHORUS_FLOWER_GROW("step.gravel:0", "block.chorus_flower.grow"),
BLOCK_CLOTH_BREAK("dig.cloth", "block.cloth.break"),
BLOCK_CLOTH_FALL("step.cloth", "block.cloth.fall"),
BLOCK_CLOTH_HIT("step.cloth", "block.cloth.hit"),
BLOCK_CLOTH_PLACE("dig.cloth", "block.cloth.place"),
BLOCK_CLOTH_STEP("step.cloth", "block.cloth.step"),
BLOCK_COMPARATOR_CLICK("random.click", "block.comparator.click"),
BLOCK_DISPENSER_DISPENSE("random.click", "block.dispenser.dispense"),
BLOCK_DISPENSER_FAIL("random.click", "block.dispenser.fail"),
BLOCK_DISPENSER_LAUNCH("random.bow", "block.dispenser.launch"),
BLOCK_ENDERCHEST_CLOSE("random.chestclosed", "block.enderchest.close"),
BLOCK_ENDERCHEST_OPEN("random.chestopen", "block.enderchest.open"),
BLOCK_END_GATEWAY_SPAWN("random.explode", "block.end_gateway.spawn"),
BLOCK_FENCE_GATE_CLOSE("random.door_close", "block.fence_gate.close"),
BLOCK_FENCE_GATE_OPEN("random.door_open", "block.fence_gate.open"),
BLOCK_FIRE_AMBIENT("fire.fire", "block.fire.ambient"),
BLOCK_FIRE_EXTINGUISH("random.fizz", "block.fire.extinguish"),
BLOCK_FURNACE_FIRE_CRACKLE("fire.fire", "block.furnace.fire_crackle"),
BLOCK_GLASS_BREAK("random.glass", "block.glass.break"),
BLOCK_GLASS_FALL("step.stone", "block.glass.fall"),
BLOCK_GLASS_HIT("step.stone", "block.glass.hit"),
BLOCK_GLASS_PLACE("dig.stone", "block.glass.place"),
BLOCK_GLASS_STEP("step.stone", "block.glass.step"),
BLOCK_GRASS_BREAK("dig.grass", "block.grass.break"),
BLOCK_GRASS_FALL("step.grass", "block.grass.fall"),
BLOCK_GRASS_HIT("step.grass", "block.grass.hit"),
BLOCK_GRASS_PLACE("dig.grass", "block.grass.place"),
BLOCK_GRASS_STEP("step.grass", "block.grass.step"),
BLOCK_GRAVEL_BREAK("dig.gravel", "block.gravel.break"),
BLOCK_GRAVEL_FALL("step.gravel", "block.gravel.fall"),
BLOCK_GRAVEL_HIT("step.gravel", "block.gravel.hit"),
BLOCK_GRAVEL_PLACE("dig.gravel", "block.gravel.place"),
BLOCK_GRAVEL_STEP("step.gravel", "block.gravel.step"),
BLOCK_IRON_DOOR_CLOSE("random.door_close", "block.iron_door.close"),
BLOCK_IRON_DOOR_OPEN("random.door_open", "block.iron_door.open"),
BLOCK_IRON_TRAPDOOR_CLOSE("random.door_close", "block.iron_trapdoor.close"),
BLOCK_IRON_TRAPDOOR_OPEN("random.door_open", "block.iron_trapdoor.open"),
BLOCK_LADDER_BREAK("dig.ladder", "block.ladder.break"),
BLOCK_LADDER_FALL("step.ladder", "block.ladder.fall"),
BLOCK_LADDER_HIT("step.ladder", "block.ladder.hit"),
BLOCK_LADDER_PLACE("dig.ladder", "block.ladder.place"),
BLOCK_LADDER_STEP("step.ladder", "block.ladder.step"),
BLOCK_LAVA_AMBIENT("liquid.lava", "block.lava.ambient"),
BLOCK_LAVA_EXTINGUISH("random.fizz", "block.lava.extinguish"),
BLOCK_LAVA_POP("liquid.lavapop", "block.lava.pop"),
BLOCK_LEVER_CLICK("random.click", "block.lever.click"),
BLOCK_METAL_BREAK("dig.stone", "block.metal.break"),
BLOCK_METAL_FALL("step.stone", "block.metal.fall"),
BLOCK_METAL_HIT("step.stone", "block.metal.hit"),
BLOCK_METAL_PLACE("dig.stone", "block.metal.place"),
BLOCK_METAL_PRESSUREPLATE_CLICK_OFF("random.click", "block.metal_pressureplate.click_off"),
BLOCK_METAL_PRESSUREPLATE_CLICK_ON("random.click", "block.metal_pressureplate.click_on"),
BLOCK_METAL_STEP("step.stone", "block.metal.step"),
BLOCK_NOTE_BASEDRUM("note.bd", "block.note.basedrum"),
BLOCK_NOTE_BASS("note.bass", "block.note.bass"),
BLOCK_NOTE_HARP("note.harp", "block.note.harp"),
BLOCK_NOTE_HAT("note.hat", "block.note.hat"),
BLOCK_NOTE_PLING("note.pling", "block.note.pling"),
BLOCK_NOTE_SNARE("note.snare", "block.note.snare"),
BLOCK_PISTON_CONTRACT("tile.piston.in", "block.piston.contract"),
BLOCK_PISTON_EXTEND("tile.piston.out", "block.piston.extend"),
BLOCK_PORTAL_AMBIENT("portal.portal", "block.portal.ambient"),
BLOCK_PORTAL_TRAVEL("portal.travel", "block.portal.travel"),
BLOCK_PORTAL_TRIGGER("portal.trigger", "block.portal.trigger"),
BLOCK_REDSTONE_TORCH_BURNOUT("random.fizz", "block.redstone_torch.burnout"),
BLOCK_SAND_BREAK("dig.sand", "block.sand.break"),
BLOCK_SAND_FALL("step.sand", "block.sand.fall"),
BLOCK_SAND_HIT("step.sand", "block.sand.hit"),
BLOCK_SAND_PLACE("dig.sand", "block.sand.place"),
BLOCK_SAND_STEP("step.sand", "block.sand.step"),
BLOCK_SLIME_BREAK("mob.slime.big", "block.slime.break"),
BLOCK_SLIME_FALL("mob.slime.attack", "block.slime.fall"),
BLOCK_SLIME_HIT("mob.slime.attack", "block.slime.hit"),
BLOCK_SLIME_PLACE("mob.slime.big", "block.slime.place"),
BLOCK_SLIME_STEP("mob.slime.attack", "block.slime.step"),
BLOCK_SNOW_BREAK("dig.snow", "block.snow.break"),
BLOCK_SNOW_FALL("step.snow", "block.snow.fall"),
BLOCK_SNOW_HIT("step.snow", "block.snow.hit"),
BLOCK_SNOW_PLACE("dig.snow", "block.snow.place"),
BLOCK_SNOW_STEP("step.snow", "block.snow.step"),
BLOCK_STONE_BREAK("dig.stone", "block.stone.break"),
BLOCK_STONE_BUTTON_CLICK_OFF("random.click", "block.stone_button.click_off"),
BLOCK_STONE_BUTTON_CLICK_ON("random.click", "block.stone_button.click_on"),
BLOCK_STONE_FALL("step.stone", "block.stone.fall"),
BLOCK_STONE_HIT("step.stone", "block.stone.hit"),
BLOCK_STONE_PLACE("dig.stone", "block.stone.place"),
BLOCK_STONE_PRESSUREPLATE_CLICK_OFF("random.click", "block.stone_pressureplate.click_off"),
BLOCK_STONE_PRESSUREPLATE_CLICK_ON("random.click", "block.stone_pressureplate.click_on"),
BLOCK_STONE_STEP("step.stone", "block.stone.step"),
BLOCK_TRIPWIRE_ATTACH("random.click", "block.tripwire.attach"),
BLOCK_TRIPWIRE_CLICK_OFF("random.click", "block.tripwire.click_off"),
BLOCK_TRIPWIRE_CLICK_ON("random.click", "block.tripwire.click_on"),
BLOCK_TRIPWIRE_DETACH("random.bowhit", "block.tripwire.detach"),
BLOCK_WATERLILY_PLACE("mob.slime.small", "block.waterlily.place"),
BLOCK_WATER_AMBIENT("liquid.water", "block.water.ambient"),
BLOCK_WOODEN_DOOR_CLOSE("random.door_close", "block.wooden_door.close"),
BLOCK_WOODEN_DOOR_OPEN("random.door_open", "block.wooden_door.open"),
BLOCK_WOODEN_TRAPDOOR_CLOSE("random.door_close", "block.wooden_trapdoor.close"),
BLOCK_WOODEN_TRAPDOOR_OPEN("random.door_open", "block.wooden_trapdoor.open"),
BLOCK_WOOD_BREAK("dig.wood", "block.wood.break"),
BLOCK_WOOD_BUTTON_CLICK_OFF("random.click", "block.wood_button.click_off"),
BLOCK_WOOD_BUTTON_CLICK_ON("random.click", "block.wood_button.click_on"),
BLOCK_WOOD_FALL("step.wood", "block.wood_fall"),
BLOCK_WOOD_HIT("step.wood", "block.wood.hit"),
BLOCK_WOOD_PLACE("dig.wood", "block.wood.place"),
BLOCK_WOOD_PRESSUREPLATE_CLICK_OFF("random.click", "block.wood_pressureplate.click_off"),
BLOCK_WOOD_PRESSUREPLATE_CLICK_ON("random.click", "block.wood_pressureplate.click_on"),
BLOCK_WOOD_STEP("step.wood", "block.wood.step"),
ENCHANT_THORNS_HIT("damage.hit", "enchant.thorns.hit"),
ENTITY_ARMORSTAND_BREAK("dig.wood", "entity.armorstand.break"),
ENTITY_ARMORSTAND_FALL("step.wood", "entity.armorstand.fall"),
ENTITY_ARMORSTAND_HIT("step.wood", "entity.armorstand.hit"),
ENTITY_ARMORSTAND_PLACE("dig.wood", "entity.armorstand.place"),
ENTITY_ARROW_HIT("random.bowhit", "entity.arrow.hit"),
ENTITY_ARROW_HIT_PLAYER("random.successful_hit", "entity.arrow.hit_player"),
ENTITY_ARROW_SHOOT("random.bow", "entity.arrow.shoot"),
ENTITY_BAT_AMBIENT("mob.bat.loop", "entity.bat.ambient"),
ENTITY_BAT_DEATH("mob.bat.idle", "entity.bat.death"),
ENTITY_BAT_HURT("mob.bat.hurt", "entity.bat.hurt"),
ENTITY_BAT_LOOP("mob.bat.loop", "entity.bat.loop"),
ENTITY_BAT_TAKEOFF("mob.bat.takeoff", "entity.bat.takeoff"),
ENTITY_BLAZE_AMBIENT("mob.blaze.breathe", "entity.blaze.ambient"),
ENTITY_BLAZE_BURN("fire.fire", "entity.blaze.burn"),
ENTITY_BLAZE_DEATH("mob.blaze.death", "entity.blaze.death"),
ENTITY_BLAZE_HURT("mob.blaze.hit", "entity.blaze.hurt"),
ENTITY_BLAZE_SHOOT("mob.ghast.fireball4", "entity.blaze.shoot"),
ENTITY_BOBBER_SPLASH("liquid.splash", "entity.bobber_splash"),
ENTITY_BOBBER_THROW("random.bow", "entity.bobber_throw"),
ENTITY_CAT_AMBIENT("mob.cat.meow", "entity.cat.ambient"),
ENTITY_CAT_DEATH("mob.cat.hitt", "entity.cat.death"),
ENTITY_CAT_HISS("mob.cat.hiss", "entity.cat.hiss"),
ENTITY_CAT_HURT("mob.cat.hitt", "entity.cat.hurt"),
ENTITY_CAT_PURR("mob.cat.purr", "entity.cat.purr"),
ENTITY_CAT_PURREOW("mob.cat.purreow", "entity.cat.purreow"),
ENTITY_CHICKEN_AMBIENT("mob.chicken.say", "entity.chicken.ambient"),
ENTITY_CHICKEN_DEATH("mob.chicken.hurt", "entity.chicken.death"),
ENTITY_CHICKEN_EGG("mob.chicken.plop", "entity.chicken.egg"),
ENTITY_CHICKEN_HURT("mob.chicken.hurt", "entity.chicken.hurt"),
ENTITY_CHICKEN_STEP("mob.chicken.step", "entity.chicken.step"),
ENTITY_COW_AMBIENT("mob.cow.say", "entity.cow.ambient"),
ENTITY_COW_DEATH("mob.cow.hurt", "entity.cow.death"),
ENTITY_COW_HURT("mob.cow.hurt", "entity.cow.hurt"),
ENTITY_COW_MILK("random.pop", "entity.cow.milk"),
ENTITY_COW_STEP("mob.cow.step", "entity.cow.step"),
ENTITY_CREEPER_DEATH("mob.creeper.death", "entity.creeper.death"),
ENTITY_CREEPER_HURT("mob.creeper.death", "entity.creeper.hurt"),
ENTITY_CREEPER_PRIMED("random.fuse", "entity.creeper.primed"),
ENTITY_DONKEY_AMBIENT("mob.donkey.idle", "entity.donkey.ambient"),
ENTITY_DONKEY_ANGRY("mob.donkey.angry", "entity.donkey.angry"),
ENTITY_DONKEY_CHEST("random.pop", "entity.donkey.chest"),
ENTITY_DONKEY_DEATH("mob.donkey.death", "entity.donkey.death"),
ENTITY_DONKEY_HURT("mob.donkey.hit", "entity.donkey.hurt"),
ENTITY_EGG_THROW("random.bow", "entity.egg.throw"),
ENTITY_ELDER_GUARDIAN_AMBIENT("mob.guardian.elder.idle", "entity.elder_guardian.ambient"),
ENTITY_ELDER_GUARDIAN_AMBIENT_LAND("mob.guardian.elder.land.idle", "entity.elder_guardian.ambient_land"),
ENTITY_ELDER_GUARDIAN_CURSE("mob.guardian.elder.curse", "entity.elder_guardian.curse"),
ENTITY_ELDER_GUARDIAN_DEATH("mob.guardian.elder.death", "entity.elder_guardian.death"),
ENTITY_ELDER_GUARDIAN_DEATH_LAND("mob.guardian.land.death", "entity.elder_guardian.death_land"),
ENTITY_ELDER_GUARDIAN_HURT("mob.guardian.elder.hit", "entity.elder_guardian.hurt"),
ENTITY_ELDER_GUARDIAN_HURT_LAND("mob.guardian.land.hit", "entity.elder_guardian.hurt_land"),
ENTITY_ENDERDRAGON_AMBIENT("mob.enderdragon.idle", "entity.enderdragon.ambient"),
ENTITY_ENDERDRAGON_DEATH("mob.enderdragon.end", "entity.enderdragon.death"),
ENTITY_ENDERDRAGON_FIREBALL_EXPLODE("", "entity.enderdragon.fireball_explode"),
ENTITY_ENDERDRAGON_FLAP("mob.enderdragon.wings", "entity.enderdragon.flap"),
ENTITY_ENDERDRAGON_GROWL("mob.enderdragon.growl", "entity.enderdragon.growl"),
ENTITY_ENDERDRAGON_HURT("mob.enderdragon.hit", "entity.enderdragon.hurt"),
ENTITY_ENDERDRAGON_SHOOT("mob.ghast.fireball4", "entity.enderdragon.shoot"),
ENTITY_ENDEREYE_LAUNCH("random.bow", "entity.endereye.launch"),
ENTITY_ENDERMEN_AMBIENT("mob.endermen.idle", "entity.endermen.ambient"),
ENTITY_ENDERMEN_DEATH("mob.endermen.death", "entity.endermen.death"),
ENTITY_ENDERMEN_HURT("mob.endermen.hit", "entity.endermen.hurt"),
ENTITY_ENDERMEN_SCREAM("mob.endermen.scream", "entity.endermen.scream"),
ENTITY_ENDERMEN_STARE("mob.endermen.stare", "entity.endermen.stare"),
ENTITY_ENDERMEN_TELEPORT("mob.endermen.portal", "entity.endermen.teleport"),
ENTITY_ENDERMITE_AMBIENT("mob.silverfish.say", "entity.endermite.ambient"),
ENTITY_ENDERMITE_DEATH("mob.silverfish.kill", "entity.endermite.death"),
ENTITY_ENDERMITE_HURT("mob.silverfish.hit", "entity.endermite.hurt"),
ENTITY_ENDERMITE_STEP("mob.silverfish.step", "entity.endermite.step"),
ENTITY_ENDERPEARL_THROW("random.bow", "entity.enderpearl.throw"),
ENTITY_EXPERIENCE_BOTTLE_THROW("random.bow", "entity.experience_bottle.throw"),
ENTITY_EXPERIENCE_ORB_PICKUP("random.orb", "entity.experience_orb.pickup"),
ENTITY_EXPERIENCE_ORB_TOUCH("random.orb", "entity.experience_orb.touch"),
ENTITY_FIREWORK_BLAST("firework.blast1", "entity.firework.blast"),
ENTITY_FIREWORK_BLAST_FAR("firework.blast_far1", "entity.firework.blast_far"),
ENTITY_FIREWORK_LARGE_BLAST("firework.largeBlast1", "entity.firework.large_blast"),
ENTITY_FIREWORK_LARGE_BLAST_FAR("firework.largeBlast_far1", "entity.firework.large_blast_far"),
ENTITY_FIREWORK_LAUNCH("firework.launch1", "entity.firework.launch"),
ENTITY_FIREWORK_SHOOT("random.bow", "entity.firework.shoot"),
ENTITY_FIREWORK_TWINKLE("firework.twinkle1", "entity.firework.twinkle"),
ENTITY_FIREWORK_TWINKLE_FAR("firework.twinkle_far1", "entity.firework.twinkle_far"),
ENTITY_GENERIC_BIG_FALL("damage.fallbig", "entity.generic.big_fall"),
ENTITY_GENERIC_BURN("random.fizz", "entity.generic.burn"),
ENTITY_GENERIC_DEATH("damage.hit", "entity.generic.death"),
ENTITY_GENERIC_DRINK("random.drink", "entity.generic.drink"),
ENTITY_GENERIC_EAT("random.eat", "entity.generic.eat"),
ENTITY_GENERIC_EXPLODE("random.explode", "entity.generic.explode"),
ENTITY_GENERIC_EXTINGUISH_FIRE("random.fizz", "entity.generic.extinguish_fire"),
ENTITY_GENERIC_HURT("damage.hurt", "entity.generic.hurt"),
ENTITY_GENERIC_SMALL_FALL("damage.fallsmall", "entity.generic.small_fall"),
ENTITY_GENERIC_SPLASH("liquid.splash", "entity.generic.splash"),
ENTITY_GENERIC_SWIM("liquid.swim", "entity.generic_swim"),
ENTITY_GHAST_AMBIENT("mob.ghast.moan", "entity.ghast.ambient"),
ENTITY_GHAST_DEATH("mob.ghast.death", "entity.ghast.death"),
ENTITY_GHAST_HURT("mob.ghast.scream", "entity.ghast.hurt"),
ENTITY_GHAST_SCREAM("mob.ghast.scream", "entity.ghast.scream"),
ENTITY_GHAST_SHOOT("mob.ghast.fireball4", "entity.ghast.shoot"),
ENTITY_GHAST_WARN("mob.ghast.charge", "entity.ghast.warn"),
ENTITY_GUARDIAN_AMBIENT("mob.guardian.idle", "entity.guardian.ambient"),
ENTITY_GUARDIAN_AMBIENT_LAND("mob.guardian.land.idle", "entity.guardian.ambient_land"),
ENTITY_GUARDIAN_ATTACK("mob.guardian.attack.loop", "entity.guardian.attack"),
ENTITY_GUARDIAN_DEATH("mob.guardian.death", "entity.guardian.death"),
ENTITY_GUARDIAN_DEATH_LAND("mob.guardian.land.death", "entity.guardian.death_land"),
ENTITY_GUARDIAN_FLOP("mob.guardian.flop", "entity.guardian.flop"),
ENTITY_GUARDIAN_HURT("mob.guardian.hit", "entity.guardian.hurt"),
ENTITY_GUARDIAN_HURT_LAND("mob.guardian.land.hit", "entity.guardian.hurt_land"),
ENTITY_HORSE_AMBIENT("mob.horse.idle", "entity.horse.ambient"),
ENTITY_HORSE_ANGRY("mob.horse.angry1", "entity.horse.angry"),
ENTITY_HORSE_ARMOR("mob.horse.armor", "entity.horse.armor"),
ENTITY_HORSE_BREATHE("mob.horse.breathe", "entity.horse.breathe"),
ENTITY_HORSE_DEATH("mob.horse.death", "entity.horse.death"),
ENTITY_HORSE_EAT("", "entity.horse.eat"),
ENTITY_HORSE_GALLOP("mob.horse.gallop", "entity.horse.gallop"),
ENTITY_HORSE_HURT("mob.horse.hit", "entity.horse.hurt"),
ENTITY_HORSE_JUMP("mob.horse.jump", "entity.horse.jump"),
ENTITY_HORSE_LAND("mob.horse.land", "entity.horse.land"),
ENTITY_HORSE_SADDLE("mob.horse.leather", "entity.horse.saddle"),
ENTITY_HORSE_STEP("mob.horse.soft", "entity.horse.step"),
ENTITY_HORSE_STEP_WOOD("mob.horse.wood", "entity.horse.step_wood"),
ENTITY_HOSTILE_BIG_FALL("damage.fallbig", "entity.hostile.big_fall"),
ENTITY_HOSTILE_DEATH("damage.hit", "entity.hostile.death"),
ENTITY_HOSTILE_HURT("damage.hit", "entity.hostile.hurt"),
ENTITY_HOSTILE_SMALL_FALL("damage.fallsmall", "entity.hostile.small_fall"),
ENTITY_HOSTILE_SPLASH("liquid.splash", "entity.hostile.splash"),
ENTITY_HOSTILE_SWIM("liquid.swin", "entity.hostile.swim"),
ENTITY_IRONGOLEM_ATTACK("mob.irongolem.hit", "entity.irongolem.attack"),
ENTITY_IRONGOLEM_DEATH("mob.irongolem.death", "entity.irongolem.death"),
ENTITY_IRONGOLEM_HURT("mob.irongolem.hit", "entity.irongolem.hurt"),
ENTITY_IRONGOLEM_STEP("mob.irongolem.step", "entity.irongolem.step"),
ENTITY_ITEMFRAME_ADD_ITEM("random.pop", "entity.itemframe.add_item"),
ENTITY_ITEMFRAME_BREAK("random.pop", "entity.itemframe.break"),
ENTITY_ITEMFRAME_PLACE("random.pop", "entity.itemframe.place"),
ENTITY_ITEMFRAME_REMOVE_ITEM("random.pop", "entity.itemframe.remove_item"),
ENTITY_ITEMFRAME_ROTATE_ITEM("random.pop", "entity.itemframe.rotate_item"),
ENTITY_ITEM_BREAK("random.pop", "entity.item.break"),
ENTITY_ITEM_PICKUP("random.pop", "entity.item.pickup"),
ENTITY_LEASHKNOT_BREAK("mob.horse.leather", "entity.leashknot.break"),
ENTITY_LEASHKNOT_PLACE("mob.horse.leather", "entity.leashknot.place"),
ENTITY_LIGHTNING_IMPACT("random.explode", "entity.lightning.impact"),
ENTITY_LIGHTNING_THUNDER("ambient.weather.thunder", "entity.lightning.thunder"),
ENTITY_LINGERINGPOTION_THROW("random.bow", "entity.lingeringpotion.throw"),
ENTITY_MAGMACUBE_DEATH("mob.magmacube.big", "entity.magmacube.death"),
ENTITY_MAGMACUBE_HURT("mob.magmacube.big", "entity.magmacube.hurt"),
ENTITY_MAGMACUBE_JUMP("mob.magmacube.jump", "entity.magmacube.jump"),
ENTITY_MAGMACUBE_SQUISH("mob.magmacube.small", "entity.magmacube.squish"),
ENTITY_MINECART_INSIDE("minecart.inside", "entity.minecart.inside"),
ENTITY_MINECART_RIDING("minecart.base", "entity.minecart.riding"),
ENTITY_MOOSHROOM_SHEAR("mob.sheep.shear", "entity.mooshroom.shear"),
ENTITY_MULE_AMBIENT("mob.horse.donkey.idle", "entity.mule.ambient"),
ENTITY_MULE_DEATH("mob.horse.donkey.death", "entity.mule.death"),
ENTITY_MULE_HURT("mob.horse.donkey.hit", "entity.mule.hurt"),
ENTITY_PAINTING_BREAK("dig.wool", "entity.painting.break"),
ENTITY_PAINTING_PLACE("dig.wool", "entity.painting.place"),
ENTITY_PIG_AMBIENT("mob.pig.say", "entity.pig.ambient"),
ENTITY_PIG_DEATH("mob.pig.death", "entity.pig.death"),
ENTITY_PIG_HURT("mob.pig.say", "entity.pig.hurt"),
ENTITY_PIG_SADDLE("mob.horse.leather", "entity.pig.saddle"),
ENTITY_PIG_STEP("mob.pig.step", "entity.pig.step"),
ENTITY_PLAYER_ATTACK_CRIT("damage.hit", "entity.player.attack.crit"),
ENTITY_PLAYER_ATTACK_KNOCKBACK("damage.hit", "entity.player.attack.knockback"),
ENTITY_PLAYER_ATTACK_NODAMAGE("damage.hit", "entity.player.attack.nodamage"),
ENTITY_PLAYER_ATTACK_STRONG("damage.hit", "entity.player.attack.strong"),
ENTITY_PLAYER_ATTACK_SWEEP("damage.hit", "entity.player.attack.sweep"),
ENTITY_PLAYER_ATTACK_WEAK("damage.hit", "entity.player.attack.weak"),
ENTITY_PLAYER_BIG_FALL("damage.fallbig", "entity.player.big_fall"),
ENTITY_PLAYER_BREATH("random.breath", "entity.player.breath"),
ENTITY_PLAYER_BURP("random.burp", "entity.player.burp"),
ENTITY_PLAYER_DEATH("damage.hit", "entity.player.death"),
ENTITY_PLAYER_HURT("damage.hit", "entity.player.hurt"),
ENTITY_PLAYER_LEVELUP("random.levelup", "entity.player.levelup"),
ENTITY_PLAYER_SMALL_FALL("damage.fallsmall", "entity.player.small_fall"),
ENTITY_PLAYER_SPLASH("liquid.splash", "entity.player.splash"),
ENTITY_PLAYER_SWIM("liquid.swim", "entity.player.swim"),
ENTITY_RABBIT_AMBIENT("mob.rabbit.idle", "entity.rabbit.ambient"),
ENTITY_RABBIT_ATTACK("damage.hit", "entity.rabbit.attack"),
ENTITY_RABBIT_DEATH("mob.rabbit.death", "entity.rabbit.death"),
ENTITY_RABBIT_HURT("mob.rabbit.hurt", "entity.rabbit.hurt"),
ENTITY_RABBIT_JUMP("mob.rabbit.hop", "entity.rabbit.jump"),
ENTITY_SHEEP_AMBIENT("mob.sheep.say", "entity.sheep.ambient"),
ENTITY_SHEEP_DEATH("mob.sheep.say", "entity.sheep.death"),
ENTITY_SHEEP_HURT("mob.sheep.say", "entity.sheep.hurt"),
ENTITY_SHEEP_SHEAR("mob.sheep.shear", "entity.sheep.shear"),
ENTITY_SHEEP_STEP("mob.sheep.step", "entity.sheep.step"),
ENTITY_SHULKER_AMBIENT("", "entity.shulker.ambient"),
ENTITY_SHULKER_BULLET_HIT("", "entity.shulker.bullet.hit"),
ENTITY_SHULKER_BULLET_HURT("", "entity.shulker.bullet.hurt"),
ENTITY_SHULKER_CLOSE("", "entity.shulker.close"),
ENTITY_SHULKER_DEATH("", "entity.shulker.death"),
ENTITY_SHULKER_HURT("", "entity.shulker.hurt"),
ENTITY_SHULKER_HURT_CLOSED("", "entity.shulker.hurt_closed"),
ENTITY_SHULKER_OPEN("", "entity.shulker.open"),
ENTITY_SHULKER_SHOOT("", "entity.shulker.shoot"),
ENTITY_SHULKER_TELEPORT("", "entity.shulker.teleport"),
ENTITY_SILVERFISH_AMBIENT("mob.silverfish.say", "entity.silverfish.ambient"),
ENTITY_SILVERFISH_DEATH("mob.silverfish.kill", "entity.silverfish.death"),
ENTITY_SILVERFISH_HURT("mob.silverfish.hit", "entity.silverfish.hurt"),
ENTITY_SILVERFISH_STEP("mob.silverfish.step", "entity.silverfish.step"),
ENTITY_SKELETON_AMBIENT("mob.skeleton.say", "entity.skeleton.ambient"),
ENTITY_SKELETON_DEATH("mob.skeleton.death", "entity.skeleton.death"),
ENTITY_SKELETON_HORSE_AMBIENT("mob.horse.skeleton.idle", "entity.skeleton_horse.ambient"),
ENTITY_SKELETON_HORSE_DEATH("mob.horse.skeleton.death", "entity.skeleton_horse.death"),
ENTITY_SKELETON_HORSE_HURT("mob.horse.skeleton.hit", "entity.skeleton_horse.hurt"),
ENTITY_SKELETON_HURT("mob.skeleton.hurt", "entity.skeleton.hurt"),
ENTITY_SKELETON_SHOOT("random.bow", "entity.skeleton.shoot"),
ENTITY_SKELETON_STEP("mob.skeleton.step", "entity.skeleton.step"),
ENTITY_SLIME_ATTACK("mob.slime.attack", "entity.slime.attack"),
ENTITY_SLIME_DEATH("mob.slime.big", "entity.slime.death"),
ENTITY_SLIME_HURT("mob.slime.big", "entity.slime.hurt"),
ENTITY_SLIME_JUMP("mob.slime.big", "entity.slime.jump"),
ENTITY_SLIME_SQUISH("mob.slime.small", "entity.slime.squish"),
ENTITY_SMALL_MAGMACUBE_DEATH("mob.magmacube.small", "entity.small_magmacube.death"),
ENTITY_SMALL_MAGMACUBE_HURT("mob.magmacube.small", "entity.small_magmacube.hurt"),
ENTITY_SMALL_MAGMACUBE_SQUISH("mob.magmacube.small", "entity.small_magmacube.squish"),
ENTITY_SMALL_SLIME_DEATH("mob.slime.small", "entity.small_slime.death"),
ENTITY_SMALL_SLIME_HURT("mob.slime.small", "entity.small_slime.hurt"),
ENTITY_SMALL_SLIME_JUMP("mob.slime.small", "entity.small_slime.jump"),
ENTITY_SMALL_SLIME_SQUISH("mob.slime.small", "entity.small_slime.squish"),
ENTITY_SNOWBALL_THROW("random.bow", "entity.snowball.throw"),
ENTITY_SNOWMAN_AMBIENT("", "entity.snowman.ambient"),
ENTITY_SNOWMAN_DEATH("dig.snow", "entity.snowman.death"),
ENTITY_SNOWMAN_HURT("dig.snow", "entity.snowman.hurt"),
ENTITY_SNOWMAN_SHOOT("random.bow", "entity.snowman.shoot"),
ENTITY_SPIDER_AMBIENT("mob.spider.say", "entity.spider.ambient"),
ENTITY_SPIDER_DEATH("mob.spider.death", "entity.spider.death"),
ENTITY_SPIDER_HURT("mob.spider.say", "entity.spider.hurt"),
ENTITY_SPIDER_STEP("mob.spider.step", "entity.spider.step"),
ENTITY_SPLASH_POTION_BREAK("game.potion.smash", "entity.splash_potion.break"),
ENTITY_SPLASH_POTION_THROW("random.bow", "entity.splash_potion.throw"),
ENTITY_SQUID_AMBIENT("", "entity.squid.ambient"),
ENTITY_SQUID_DEATH("", "entity.squid.death"),
ENTITY_SQUID_HURT("", "entity.squid.hurt"),
ENTITY_TNT_PRIMED("random.fuse", "entity.tnt.primed"),
ENTITY_VILLAGER_AMBIENT("mob.villager.idle", "entity.villager.ambient"),
ENTITY_VILLAGER_DEATH("mob.villager.death", "entity.villager.death"),
ENTITY_VILLAGER_HURT("mob.villager.hit", "entity.villager.hurt"),
ENTITY_VILLAGER_NO("mob.villager.no", "entity.villager.no"),
ENTITY_VILLAGER_TRADING("mob.villager.haggle", "entity.villager.trading"),
ENTITY_VILLAGER_YES("mob.villager.yes", "entity.villager.yes"),
ENTITY_WITCH_AMBIENT("mob.villager.idle", "entity.witch.ambient"),
ENTITY_WITCH_DEATH("mob.villager.death", "entity.witch.death"),
ENTITY_WITCH_DRINK("liquid.splash", "entity.witch.drink"),
ENTITY_WITCH_HURT("mob.villaher.hit", "entity.witch_hurt"),
ENTITY_WITCH_THROW("random.bow", "entity.witch_throw"),
ENTITY_WITHER_AMBIENT("mob.wither.idle", "entity.wither.ambient"),
ENTITY_WITHER_BREAK_BLOCK("mob.zombie.woodbreak", "entity.wither.break_block"),
ENTITY_WITHER_DEATH("mob.wither.death", "entity.wither.death"),
ENTITY_WITHER_HURT("mob.wither.hurt", "entity.wither.hurt"),
ENTITY_WITHER_SHOOT("mob.wither.shoot", "entity.wither.shoot"),
ENTITY_WITHER_SPAWN("mob.wither.spawn", "entity.wither.spawn"),
ENTITY_WOLF_AMBIENT("mob.wolf.bark", "entity.wolf.ambient"),
ENTITY_WOLF_DEATH("mob.wolf.death", "entity.wolf.death"),
ENTITY_WOLF_GROWL("mob.wolf.growl", "entity.wolf.growl"),
ENTITY_WOLF_HOWL("mob.wolf.howl", "entity.wolf.howl"),
ENTITY_WOLF_HURT("mob.wolf.hurt", "entity.wolf.hurt"),
ENTITY_WOLF_PANT("mob.wolf.panting", "entity.wolf.pant"),
ENTITY_WOLF_SHAKE("mob.wolf.shake", "entity.wolf.shake"),
ENTITY_WOLF_STEP("mob.wolf.step", "entity.wolf.step"),
ENTITY_WOLF_WHINE("mob.wolf.whine", "entity.wolf.whine"),
ENTITY_ZOMBIE_AMBIENT("mob.zombie.idle", "entity.zombie.ambient"),
ENTITY_ZOMBIE_ATTACK_DOOR_WOOD("mob.zombie.wood", "entity.zombie.attack.door_wood"),
ENTITY_ZOMBIE_ATTACK_IRON_DOOR("mob.zombie.wood", "entity.zombie.attack.iron_door"),
ENTITY_ZOMBIE_BREAK_DOOR_WOOD("mob.zombie.woodbreak", "entity.zombie.break_door_wood"),
ENTITY_ZOMBIE_DEATH("mob.zombie.death", "entity.zombie.death"),
ENTITY_ZOMBIE_HORSE_AMBIENT("mob.horse.zombie.idle", "entity.zombie_horse.ambient"),
ENTITY_ZOMBIE_HORSE_DEATH("mob.horse.zombie.death", "entity.zombie_horse.death"),
ENTITY_ZOMBIE_HORSE_HURT("hit", "entity.zombie.horse_hurt"),
ENTITY_ZOMBIE_HURT("mob.zombie.hurt", "entity.zombie.hurt"),
ENTITY_ZOMBIE_INFECT("mob.zombie.infect", "entity.zombie.infect"),
ENTITY_ZOMBIE_PIG_AMBIENT("mob.zombiepig.zpig", "entity.zombie_pig.ambient"),
ENTITY_ZOMBIE_PIG_ANGRY("mob.zombiepig.zpigangry", "entity.zombie_pig.angry"),
ENTITY_ZOMBIE_PIG_DEATH("mob.zombiepig.zpigdeath", "entity.zombie_pig.death"),
ENTITY_ZOMBIE_PIG_HURT("mob.zombiepig.hurt", "entity.zombie_pig.hurt"),
ENTITY_ZOMBIE_STEP("mob.zombie.step", "entity.zombie.step"),
ENTITY_ZOMBIE_VILLAGER_AMBIENT("mob.zombie.idle", "entity.zombie.villager_ambient"),
ENTITY_ZOMBIE_VILLAGER_CONVERTED("mob.zombie.unfect", "entity.zombie.villager_converted"),
ENTITY_ZOMBIE_VILLAGER_CURE("mob.zombie.remedy", "entity.zombie.villager_cure"),
ENTITY_ZOMBIE_VILLAGER_DEATH("mob.zombie.death", "entity.zombie.villager_death"),
ENTITY_ZOMBIE_VILLAGER_HURT("mob.zombie.hurt", "entity.zombie.villager_hurt"),
ENTITY_ZOMBIE_VILLAGER_STEP("mob.zombie.step", "entity.zombie.villager_step"),
ITEM_ARMOR_EQUIP_CHAIN("random.pop", "item.armor.equip_chain"),
ITEM_ARMOR_EQUIP_DIAMOND("random.pop", "item.armor.equip_diamond"),
ITEM_ARMOR_EQUIP_GENERIC("random.pop", "item.armor.equip_generic"),
ITEM_ARMOR_EQUIP_GOLD("random.pop", "item.armor.equip_gold"),
ITEM_ARMOR_EQUIP_IRON("random.pop", "item.armor.equip_iron"),
ITEM_ARMOR_EQUIP_LEATHER("mob.horse.leather", "item.armor.equip_leather"),
ITEM_BOTTLE_FILL("liquid.splash", "item.bottle.fill"),
ITEM_BOTTLE_FILL_DRAGONBREATH("liquid.splash", "item.bottle.fill_dragonbreath"),
ITEM_BUCKET_EMPTY("liquid.splash", "item.bucket.empty"),
ITEM_BUCKET_EMPTY_LAVA("liquid.splash", "item.bucket.empty_lava"),
ITEM_BUCKET_FILL("liquid.splash", "item.bucket.fill"),
ITEM_BUCKET_FILL_LAVA("liquid.splash", "item.bucket.fill_lava"),
ITEM_CHORUS_FRUIT_TELEPORT("mob.endermen.portal", "item.chorus_fruit.teleport"),
ITEM_ELYTRA_FLYING("", "item.elytra_flying"),
ITEM_FIRECHARGE_USE("item.fireCharge.use", "item.firecharge.use"),
ITEM_FLINTANDSTEEL_USE("fire.ingnite", "item.flintandsteel.use"),
ITEM_HOE_TILL("step.grass", "item.hoe.till"),
ITEM_SHIELD_BLOCK("", "item.shield.block"),
ITEM_SHIELD_BREAK("random.anvil_break", "item.shield.break"),
ITEM_SHOVEL_FLATTEN("dig.grass", "item.shovel.flatten"),
MUSIC_CREATIVE("music.game.creative", "music.creative"),
MUSIC_CREDITS("music.game.end.credits", "music.credits"),
MUSIC_DRAGON("music.game.end.dragon", "music.dragon"),
MUSIC_END("music.game.end", "music.end"),
MUSIC_GAME("music.game", "music.game"),
MUSIC_MENU("music.menu", "music.menu"),
MUSIC_NETHER("music.game.nether", "music.nether"),
RECORD_11("records.record_11", "record.11"),
RECORD_13("records.record_13", "record.13"),
RECORD_BLOCKS("records.blocks", "record.blocks"),
RECORD_CAT("records.cat", "record.cat"),
RECORD_CHIRP("records.chrip", "record.chirp"),
RECORD_FAR("records.far", "record.far"),
RECORD_MALL("records.mall", "record.mall"),
RECORD_MELLOHI("records.mellohi", "record.mellohi"),
RECORD_STAL("records.stal", "record.stal"),
RECORD_STRAD("records.strad", "record.strad"),
RECORD_WAIT("records.wait", "record.wait"),
RECORD_WARD("records.ward", "record.ward"),
UI_BUTTON_CLICK("random.click", "ui.button.click"),
WEATHER_RAIN("ambient.weather.rain", "weather.rain"),
WEATHER_RAIN_ABOVE("ambient.weather.rain", "weather.rain.above");
private String oldSound;
private String newSound;
SoundHelper(String oldSound, String newSound) {
this.oldSound = oldSound;
this.newSound = newSound;
}
/**
* Play sound with version bridge!
*
* @param player
* @param sound
* @param volume
* @param pitch
*/
public static void playSound(Player player, SoundHelper sound, float volume, float pitch){
String s = "";
if(getVersion()>=110){
s = sound.newSound;
}else{
s = sound.oldSound;
}
player.playSound(player.getLocation(), s, volume, pitch);
}
public void play(Player player, float volume, float pitch){
playSound(player, this, volume, pitch);
}
public static int getVersion(){
return Integer.parseInt(Bukkit.getVersion().substring(Bukkit.getVersion().lastIndexOf("MC: ")+4).replace(")", "").replace(".", ""));
}
public String getOldSound() {
return oldSound;
}
public String getNewSound() {
return newSound;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment