fixed bug in biome filter validation

master
Stefan Dollase 2016-07-03 22:31:03 +02:00
parent 4aca8d777f
commit 9215092650
2 changed files with 3 additions and 1 deletions

View File

@ -24,7 +24,7 @@ public class WorldFilterJson_Biome {
notifications.add("No biomes for filter");
} else {
for (String name : biomes) {
if (Biome.exists(name)) {
if (!Biome.exists(name)) {
notifications.add("invalid biome name: '" + name + "'");
}
}

View File

@ -8,6 +8,7 @@ import java.util.Optional;
import amidst.documentation.GsonConstructor;
import amidst.documentation.Immutable;
import amidst.logging.Log;
import amidst.mojangapi.world.filter.WorldFilter;
import amidst.mojangapi.world.filter.WorldFilter_MatchAll;
@ -55,6 +56,7 @@ public class WorldFilterJson_MatchAll {
return Optional.of(createWorldFilter());
} else {
// TODO: use error messages
Log.debug(getValidationMessages());
return Optional.empty();
}
}