diff --git a/src/main/java/net/minecraft/server/BlockRedstoneOre.java b/src/main/java/net/minecraft/server/BlockRedstoneOre.java index ac5dd4335d..8d28de8bd8 100644 --- a/src/main/java/net/minecraft/server/BlockRedstoneOre.java +++ b/src/main/java/net/minecraft/server/BlockRedstoneOre.java @@ -25,8 +25,22 @@ public class BlockRedstoneOre extends Block { } public void b(World world, int i, int j, int k, Entity entity) { - this.g(world, i, j, k); - super.b(world, i, j, k, entity); + // CraftBukkit start + if (entity instanceof EntityHuman) { + org.bukkit.event.player.PlayerInteractEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent((EntityHuman) entity, org.bukkit.event.block.Action.PHYSICAL, i, j, k, -1, null); + if (!event.isCancelled()) { + this.g(world, i, j, k); + super.b(world, i, j, k, entity); + } + } else { + org.bukkit.event.entity.EntityInteractEvent event = new org.bukkit.event.entity.EntityInteractEvent(entity.getBukkitEntity(), world.getWorld().getBlockAt(i, j, k)); + world.getServer().getPluginManager().callEvent(event); + if (!event.isCancelled()) { + this.g(world, i, j, k); + super.b(world, i, j, k, entity); + } + } + // CraftBukkit end } public boolean interact(World world, int i, int j, int k, EntityHuman entityhuman) {