diff --git a/src/main/java/net/brennholz/challenges/EventListener.java b/src/main/java/net/brennholz/challenges/EventListener.java index f4c2e70..a8221fa 100644 --- a/src/main/java/net/brennholz/challenges/EventListener.java +++ b/src/main/java/net/brennholz/challenges/EventListener.java @@ -52,10 +52,10 @@ public void onBlockExplode(BlockExplodeEvent e) { if (this.chl.getConfig().getBoolean("rnddrops") == true) { e.setCancelled(true); + e.getBlock().getWorld().playSound(e.getBlock().getLocation(), Sound.ENTITY_GENERIC_EXPLODE, (float) 0.1, 1); e.blockList().forEach(block -> { block.getWorld().dropItem(block.getLocation().add(0.5D, 0.5D, 0.5D),new ItemStack(this.chl.getRandomDropsManager().getMaterialFromBlock(block))); block.setType(Material.AIR); - e.getBlock().getWorld().playSound(e.getBlock().getLocation(), Sound.ENTITY_GENERIC_EXPLODE, (float) 0.1, 1); }); } } @@ -64,10 +64,10 @@ public void onEntityExplode(EntityExplodeEvent e) { if (this.chl.getConfig().getBoolean("rnddrops") == true) { e.setCancelled(true); + e.getEntity().getWorld().playSound(e.getEntity().getLocation(), Sound.ENTITY_GENERIC_EXPLODE, (float) 0.1, 1); e.blockList().forEach(block -> { block.getWorld().dropItem(block.getLocation().add(0.5D, 0.5D, 0.5D),new ItemStack(this.chl.getRandomDropsManager().getMaterialFromBlock(block))); block.setType(Material.AIR); - e.getEntity().getWorld().playSound(e.getEntity().getLocation(), Sound.ENTITY_GENERIC_EXPLODE, (float) 0.1, 1); }); } }