From 6a61d27c10e82e16679aa0df0e6b345da15d0f14 Mon Sep 17 00:00:00 2001 From: md-5 Date: Tue, 5 Mar 2013 07:22:03 +1100 Subject: [PATCH] Quick fix damage event --- CraftBukkit-Patches/0041-PlayerItemDamageEvent.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CraftBukkit-Patches/0041-PlayerItemDamageEvent.patch b/CraftBukkit-Patches/0041-PlayerItemDamageEvent.patch index c4106e5..a1eb6ec 100644 --- a/CraftBukkit-Patches/0041-PlayerItemDamageEvent.patch +++ b/CraftBukkit-Patches/0041-PlayerItemDamageEvent.patch @@ -19,7 +19,7 @@ index 3043db9..8925327 100644 + // Spigot start + if (entityliving instanceof EntityPlayer) { + org.bukkit.craftbukkit.inventory.CraftItemStack item = org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(this); -+ org.bukkit.event.player.PlayerItemDamageEvent event = new org.bukkit.event.player.PlayerItemDamageEvent((org.bukkit.entity.Player) entityliving.getBukkitEntity(), item, damage); ++ org.bukkit.event.player.PlayerItemDamageEvent event = new org.bukkit.event.player.PlayerItemDamageEvent((org.bukkit.entity.Player) entityliving.getBukkitEntity(), item, i); + org.bukkit.Bukkit.getServer().getPluginManager().callEvent(event); + if (event.isCancelled()) return; + i = event.getDamage();