From 0675ead1692d1569c8ad43e22dff97c5225fa03e Mon Sep 17 00:00:00 2001 From: sk89q Date: Sun, 23 Jan 2011 14:06:16 -0800 Subject: [PATCH] Added PlayerEggThrowEvent.getEgg(). --- src/main/java/net/minecraft/server/EntityEgg.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/minecraft/server/EntityEgg.java b/src/main/java/net/minecraft/server/EntityEgg.java index bd9e9d3439..7aaae478e4 100644 --- a/src/main/java/net/minecraft/server/EntityEgg.java +++ b/src/main/java/net/minecraft/server/EntityEgg.java @@ -4,6 +4,7 @@ import java.util.List; import java.util.Random; // CraftBukkit start +import org.bukkit.entity.Egg; import org.bukkit.entity.MobType; import org.bukkit.entity.Player; import org.bukkit.craftbukkit.entity.CraftEgg; @@ -209,7 +210,9 @@ public class EntityEgg extends Entity { Type eventType = Type.PLAYER_EGG_THROW; Player player = (ak == null)?null:(Player) ak.getBukkitEntity(); - PlayerEggThrowEvent event = new PlayerEggThrowEvent(eventType, player, hatching, numHatching, hatchingType); + PlayerEggThrowEvent event = new PlayerEggThrowEvent( + eventType, player, (Egg)this.bukkitEntity, hatching, + numHatching, hatchingType); server.getPluginManager().callEvent(event); hatching = event.isHatching(); numHatching = event.getNumHatches();