From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 5 Jun 2018 22:47:26 -0400 Subject: [PATCH] WitchReadyPotionEvent diff --git a/src/main/java/net/minecraft/server/EntityWitch.java b/src/main/java/net/minecraft/server/EntityWitch.java index 2e085e3c4021719eeaefa0a3323f03567e988c81..fc58cce8455dcf244355189fabb1a76114c19368 100644 --- a/src/main/java/net/minecraft/server/EntityWitch.java +++ b/src/main/java/net/minecraft/server/EntityWitch.java @@ -118,7 +118,11 @@ public class EntityWitch extends EntityRaider implements IRangedEntity { } if (potionregistry != null) { - this.setSlot(EnumItemSlot.MAINHAND, PotionUtil.a(new ItemStack(Items.POTION), potionregistry)); + // Paper start + ItemStack potion = PotionUtil.a(new ItemStack(Items.POTION), potionregistry); + org.bukkit.inventory.ItemStack bukkitStack = com.destroystokyo.paper.event.entity.WitchReadyPotionEvent.process((org.bukkit.entity.Witch) this.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(potion)); + this.setSlot(EnumItemSlot.MAINHAND, org.bukkit.craftbukkit.inventory.CraftItemStack.asNMSCopy(bukkitStack)); + // Paper end this.bq = this.getItemInMainHand().k(); this.v(true); if (!this.isSilent()) {