Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package me.pogostick29.blocksound;
- import org.bukkit.Bukkit;
- import org.bukkit.Sound;
- import org.bukkit.event.EventHandler;
- import org.bukkit.event.Listener;
- import org.bukkit.event.block.BlockBreakEvent;
- import org.bukkit.plugin.java.JavaPlugin;
- public class BlockSound extends JavaPlugin implements Listener {
- public void onEnable() {
- Bukkit.getServer().getPluginManager().registerEvents(this, this);
- }
- @EventHandler
- public void onBlockBreak(BlockBreakEvent e) {
- if (!e.isCancelled()) e.getBlock().getWorld().playSound(e.getBlock().getLocation(), Sound.GHAST_SCREAM, 1, 1);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment