summaryrefslogtreecommitdiffstats
path: root/nms-patches
diff options
context:
space:
mode:
authorParker Hawke <hawkeboyz2@hotmail.com>2018-09-08 00:15:33 -0400
committermd_5 <git@md-5.net>2018-09-09 18:44:55 +1000
commit226db0eae7bbaac7d7a14c4ddc608f5868e3731a (patch)
treede7c85650c13bbadbeecbd30f215ed0362411379 /nms-patches
parentcd367fa4d829b3ca386a94b73dfb7b47ae9cf06b (diff)
downloadcraftbukkit-226db0eae7bbaac7d7a14c4ddc608f5868e3731a.tar
craftbukkit-226db0eae7bbaac7d7a14c4ddc608f5868e3731a.tar.gz
craftbukkit-226db0eae7bbaac7d7a14c4ddc608f5868e3731a.tar.lz
craftbukkit-226db0eae7bbaac7d7a14c4ddc608f5868e3731a.tar.xz
craftbukkit-226db0eae7bbaac7d7a14c4ddc608f5868e3731a.zip
Add BlockDispenseArmorEvent
Diffstat (limited to 'nms-patches')
-rw-r--r--nms-patches/ItemArmor.patch4
1 files changed, 2 insertions, 2 deletions
diff --git a/nms-patches/ItemArmor.patch b/nms-patches/ItemArmor.patch
index 575de65b..c9babe43 100644
--- a/nms-patches/ItemArmor.patch
+++ b/nms-patches/ItemArmor.patch
@@ -6,7 +6,7 @@
+// CraftBukkit start
+import org.bukkit.craftbukkit.inventory.CraftItemStack;
-+import org.bukkit.event.block.BlockDispenseEvent;
++import org.bukkit.event.block.BlockDispenseArmorEvent;
+// CraftBukkit end
+
public class ItemArmor extends Item {
@@ -21,7 +21,7 @@
+ org.bukkit.block.Block block = world.getWorld().getBlockAt(isourceblock.getBlockPosition().getX(), isourceblock.getBlockPosition().getY(), isourceblock.getBlockPosition().getZ());
+ CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1);
+
-+ BlockDispenseEvent event = new BlockDispenseEvent(block, craftItem.clone(), new org.bukkit.util.Vector(0, 0, 0));
++ BlockDispenseArmorEvent event = new BlockDispenseArmorEvent(block, craftItem.clone(), (org.bukkit.craftbukkit.entity.CraftLivingEntity) entityliving.bukkitEntity);
+ if (!BlockDispenser.eventFired) {
+ world.getServer().getPluginManager().callEvent(event);
+ }