Clear drops even if no items are being dropped.

This commit is contained in:
Brianna 2019-12-27 08:29:44 -05:00
parent 48d329b2fe
commit 05c015e7b5
1 changed files with 3 additions and 1 deletions

View File

@ -35,6 +35,9 @@ public class DropUtils {
if (drop.getCommand() != null)
commands.add(drop.getCommand());
}
event.getDrops().clear();
if (!items.isEmpty())
dropItems(items, event);
else if (!commands.isEmpty())
@ -42,7 +45,6 @@ public class DropUtils {
}
private static void dropItems(List<ItemStack> items, EntityDeathEvent event) {
event.getDrops().clear();
for (ItemStack item : items)
event.getDrops().add(item);
}