mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 03:43:40 +01:00
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 <admin@feildmaster.com>
This commit is contained in:
parent
2d0ea62fb2
commit
be291480fc
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue