diff --git a/java/src/game/command/EntityListParser.java b/java/src/game/command/EntityListParser.java index e9ead68..2ebe75e 100644 --- a/java/src/game/command/EntityListParser.java +++ b/java/src/game/command/EntityListParser.java @@ -98,7 +98,7 @@ public class EntityListParser extends EntityParser { for(WorldServer world : env.getServer().getWorlds()) { for(Entity ent : world.getEntities()) { if((!this.livingOnly || ent instanceof EntityLiving) && - (negateOnly || (living != null && living == (ent instanceof EntityLiving)) || (player != null && player == ent.isPlayer()) || types.contains(ent.getType()) || + (negateOnly || (living != null && types.isEmpty() && classes.isEmpty() && living == (ent instanceof EntityLiving)) || (player != null && types.isEmpty() && classes.isEmpty() && player == ent.isPlayer()) || types.contains(ent.getType()) || classes.contains(ent.getClass())) && (living == null || living == (ent instanceof EntityLiving)) && (player == null || player == ent.isPlayer()) && !ntypes.contains(ent.getType()) && !nclasses.contains(ent.getClass()) && !nentities.contains(ent) && !entities.contains(ent)) diff --git a/java/src/game/command/commands/CommandPotion.java b/java/src/game/command/commands/CommandPotion.java index 1268d5f..edf0d5a 100644 --- a/java/src/game/command/commands/CommandPotion.java +++ b/java/src/game/command/commands/CommandPotion.java @@ -1,7 +1,6 @@ package game.command.commands; import java.util.List; -import game.collect.Lists; import game.command.CommandEnvironment; import game.command.Command; import game.command.Executor; @@ -13,12 +12,8 @@ public class CommandPotion extends Command { public CommandPotion() { super("potion"); - List potions = Lists.newArrayList(); - for(Potion potion : Potion.values()) { - potions.add(potion); - } this.addLivingEntityList("entities", true); - this.addEnum("type", Potion.class, potions); + this.addEnum("type", Potion.class, Potion.values()); this.setParamsOptional(); this.addInt("duration", 0, 1000000, 1000000); this.addInt("strength", 1, 256, 1);