Make call to #dropItemNaturally sync

SD-9217
This commit is contained in:
Christian Koop 2022-06-16 12:53:24 +02:00
parent 300b12502a
commit dc54199fd6
No known key found for this signature in database
GPG Key ID: 89A8181384E010A3

View File

@ -297,8 +297,9 @@ public class StackingTask extends BukkitRunnable {
}
// Drop lead if applicable then remove our entity and mark it as processed.
if (entity.isLeashed())
entity.getWorld().dropItemNaturally(entity.getLocation(), CompatibleMaterial.LEAD.getItem());
if (entity.isLeashed()) {
Bukkit.getScheduler().runTask(plugin, () -> entity.getWorld().dropItemNaturally(entity.getLocation(), CompatibleMaterial.LEAD.getItem()));
}
livingEntities.add(entity);
Bukkit.getScheduler().runTask(plugin, entity::remove);
processed.add(entity.getUniqueId());