final int quantityToDrop = (int) Math.round(item.getQuantity()
* percentage);
if (quantityToDrop > 0) {
final StackableItem itemToDrop = item.splitOff(quantityToDrop);
new ItemLogger().splitOff(player, item, itemToDrop, quantityToDrop);
new ItemLogger().equipAction(player, itemToDrop,
new String[]{"slot", player.getName(), object.second().getName()},
new String[]{"slot", player.getName(), "content"});
corpse.add(itemToDrop);
numberOfDrops += quantityToDrop;
drops.add(itemToDrop);
}
} else if (object.first() instanceof Item) {
Item justItem = (Item) object.first();
object.second().remove(object.first().getID());
new ItemLogger().equipAction(player, (Entity) object.first(),
new String[]{"slot", player.getName(), object.second().getName()},
new String[]{"slot", player.getName(), "content"});
corpse.add((PassiveEntity) object.first());
numberOfDrops += 1;