From be291480fc0eb91901106b0da9d78c9b28710389 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Fri, 28 Dec 2012 20:27:41 -0600 Subject: [PATCH] Fix persistence on tamed pets. Fixes BUKKIT-3300 With the persistence api introduced, pets did not have their persistence flag updated to reflect their persistence. This caused tame ocelots to not persist under specific conditions. By: feildmaster --- .../java/org/bukkit/craftbukkit/event/CraftEventFactory.java | 2 ++ 1 file changed, 2 insertions(+) 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 9850ac7e2b..a62adcd2c1 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 @@ -236,6 +236,8 @@ public class CraftEventFactory { org.bukkit.entity.AnimalTamer bukkitTamer = (tamer != null ? (AnimalTamer) tamer.getBukkitEntity() : null); CraftServer craftServer = (CraftServer) bukkitEntity.getServer(); + entity.persistent = true; + EntityTameEvent event = new EntityTameEvent((LivingEntity) bukkitEntity, bukkitTamer); craftServer.getPluginManager().callEvent(event); return event;