diff --git a/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/parts/SearchPart.java b/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/parts/SearchPart.java index 6eacbb1..00dfd85 100644 --- a/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/parts/SearchPart.java +++ b/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/parts/SearchPart.java @@ -80,8 +80,15 @@ public class SearchPart extends SWCommand { String current = query[i]; if (searchMapper.containsKey(current)) { if (searchMapper.get(current) == null) { - if (current.equals("-public")) { - userId = 0; + switch (current) { + case "-public": + userId = 0; + break; + case "-ignoreCase": + isIgnoreCase.set(true); + break; + default: + throw new IllegalStateException("Unexpected value: " + current); } } else if (i + 1 < query.length) { int finalI = i; @@ -114,9 +121,6 @@ public class SearchPart extends SWCommand { } predicates.add(node -> node.getOwner() != steamwarUser1.getId()); break; - case "-ignoreCase": - isIgnoreCase.set(true); - break; default: throw new IllegalStateException("Unexpected value: " + current); }