From b8c522d56d159fb9b7a291f1f7973e67fb41ea66 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 18 Jul 2021 11:08:18 +1000 Subject: [PATCH] SPIGOT-6657: Add getPlayer to SheepDyeWoolEvent --- nms-patches/net/minecraft/world/item/ItemDye.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nms-patches/net/minecraft/world/item/ItemDye.patch b/nms-patches/net/minecraft/world/item/ItemDye.patch index d8627c61a..193ba8fe2 100644 --- a/nms-patches/net/minecraft/world/item/ItemDye.patch +++ b/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()) {