From c8b101b9de2927c5f2ac0c5d93dfeaee11a051db Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Sun, 12 Jun 2011 23:38:35 -0400 Subject: [PATCH] Fixed EntityTame event. By: EvilSeph --- .../java/org/bukkit/craftbukkit/event/CraftEventFactory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/paper-server/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java index a21d136519..6074d0727f 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -238,7 +238,7 @@ public class CraftEventFactory { */ public static EntityTameEvent callEntityTameEvent(EntityLiving entity, EntityHuman tamer) { org.bukkit.entity.Entity bukkitEntity = entity.getBukkitEntity(); - org.bukkit.entity.AnimalTamer bukkitTamer = (AnimalTamer) tamer.getBukkitEntity(); + org.bukkit.entity.AnimalTamer bukkitTamer = (tamer != null ? (AnimalTamer) tamer.getBukkitEntity() : null); CraftServer craftServer = (CraftServer) bukkitEntity.getServer(); EntityTameEvent event = new EntityTameEvent(bukkitEntity, bukkitTamer);