From 41712eddeb367a66cc2446e4e23c31a997bb7568 Mon Sep 17 00:00:00 2001 From: md_5 Date: Wed, 29 Apr 2020 17:21:06 +1000 Subject: [PATCH] SPIGOT-5707: PersistentDataHolder not Persistent on API dropped Item --- src/main/java/org/bukkit/craftbukkit/CraftWorld.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index 530dd9c83e..5318dfd2b5 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -593,9 +593,7 @@ public class CraftWorld implements World { EntityItem entity = new EntityItem(world, loc.getX(), loc.getY(), loc.getZ(), CraftItemStack.asNMSCopy(item)); entity.pickupDelay = 10; world.addEntity(entity, SpawnReason.CUSTOM); - // TODO this is inconsistent with how Entity.getBukkitEntity() works. - // However, this entity is not at the moment backed by a server entity class so it may be left. - return new CraftItem(world.getServer(), entity); + return (org.bukkit.entity.Item) entity.getBukkitEntity(); } @Override