diff --git a/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/SchematicCommand.java b/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/SchematicCommand.java index 44efd0a..79a7ecc 100644 --- a/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/SchematicCommand.java +++ b/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/SchematicCommand.java @@ -303,7 +303,7 @@ public class SchematicCommand extends SWCommand { int finalI = i; switch (current) { case "-type": - predicates.add(node -> node.getSchemtype().name().equalsIgnoreCase(query[finalI + 1])); + predicates.add(node -> !node.isDir() && node.getSchemtype().name().equalsIgnoreCase(query[finalI + 1])); break; case "-item": predicates.add(node -> node.getItem().equalsIgnoreCase(query[finalI + 1])); @@ -320,7 +320,7 @@ public class SchematicCommand extends SWCommand { predicates.add(node -> !node.getName().contains(query[finalI + 1])); break; case "-excludeType": - predicates.add(node -> !node.getSchemtype().name().equalsIgnoreCase(query[finalI + 1])); + predicates.add(node -> !node.isDir() && !node.getSchemtype().name().equalsIgnoreCase(query[finalI + 1])); break; case "-excludeOwner": SteamwarUser steamwarUser1 = SteamwarUser.get(query[finalI + 1]); @@ -340,7 +340,7 @@ public class SchematicCommand extends SWCommand { i++; } - List nodes = SchematicNode.getAll(user).stream().filter(node -> { + List nodes = SchematicNode.getAll(SteamwarUser.get(userId)).stream().filter(node -> { for (Predicate predicate : predicates) { if (!predicate.test(node)) { return false;