13
0
geforkt von Mirrors/Paper

SPIGOT-6657: Add getPlayer to SheepDyeWoolEvent

By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
CraftBukkit/Spigot 2021-07-18 11:08:18 +10:00
Ursprung 5eb7a2ed61
Commit fd8748b4bd

Datei anzeigen

@ -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()) {