From fd8748b4bd076ddd4790eca0b096ecad4a867254 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Sun, 18 Jul 2021 11:08:18 +1000 Subject: [PATCH] SPIGOT-6657: Add getPlayer to SheepDyeWoolEvent By: md_5 --- paper-server/nms-patches/net/minecraft/world/item/ItemDye.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper-server/nms-patches/net/minecraft/world/item/ItemDye.patch b/paper-server/nms-patches/net/minecraft/world/item/ItemDye.patch index d8627c61a0..193ba8fe27 100644 --- a/paper-server/nms-patches/net/minecraft/world/item/ItemDye.patch +++ b/paper-server/nms-patches/net/minecraft/world/item/ItemDye.patch @@ -16,7 +16,7 @@ - entitysheep.setColor(this.dyeColor); + // CraftBukkit start + byte bColor = (byte) this.dyeColor.getColorIndex(); -+ SheepDyeWoolEvent event = new SheepDyeWoolEvent((org.bukkit.entity.Sheep) entitysheep.getBukkitEntity(), org.bukkit.DyeColor.getByWoolData(bColor)); ++ SheepDyeWoolEvent event = new SheepDyeWoolEvent((org.bukkit.entity.Sheep) entitysheep.getBukkitEntity(), org.bukkit.DyeColor.getByWoolData(bColor), (org.bukkit.entity.Player) entityhuman.getBukkitEntity()); + entitysheep.level.getCraftServer().getPluginManager().callEvent(event); + + if (event.isCancelled()) {