Remove from database on removeall command.

This commit is contained in:
Brianna 2021-04-12 09:09:54 -05:00
parent 781e788a5f
commit e9e3cf119c
1 changed files with 3 additions and 1 deletions

View File

@ -46,8 +46,10 @@ public class CommandRemoveAll extends AbstractCommand {
for (Entity entityO : world.getEntities()) {
if (entityO instanceof Player) continue;
if (entityO instanceof LivingEntity && (stackManager.isStackedAndLoaded((LivingEntity)entityO) || all) && type.equalsIgnoreCase("entities")) {
if (entityO instanceof LivingEntity && (stackManager.isStackedAndLoaded((LivingEntity)entityO) || all)
&& type.equalsIgnoreCase("entities")) {
entityO.remove();
plugin.getEntityStackManager().removeStack(entityO);
amountRemoved++;
} else if (entityO.getType() == EntityType.DROPPED_ITEM && type.equalsIgnoreCase("items")) {
if (!UltimateStacker.hasCustomAmount((Item)entityO) && !all)