From b11ee8776df17b0c6b9b7347ed37893c79ab27a0 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Thu, 18 Jan 2024 23:43:48 +0100 Subject: [PATCH] Remove Rank checks --- .../src/de/steamwar/inventory/SchematicSelector.java | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/SpigotCore_Main/src/de/steamwar/inventory/SchematicSelector.java b/SpigotCore_Main/src/de/steamwar/inventory/SchematicSelector.java index b3e3e32..73c4525 100644 --- a/SpigotCore_Main/src/de/steamwar/inventory/SchematicSelector.java +++ b/SpigotCore_Main/src/de/steamwar/inventory/SchematicSelector.java @@ -456,7 +456,7 @@ public class SchematicSelector { nodes.removeIf(node -> !node.isDir()); } if(target.target == Target.SCHEMATIC_TYPE) { - nodes.removeIf(node -> node.isDir() || !node.getSchemtype().equals(target.type) || node.getRank() > target.rank); + nodes.removeIf(node -> node.isDir() || !node.getSchemtype().equals(target.type)); } return nodes; } @@ -470,14 +470,6 @@ public class SchematicSelector { break; case SCHEMATIC_TYPE: nodes.addAll(SchematicNode.accessibleByUserTypeParent(user, target.type, parent==null?null:parent.getId())); - if(target.rank >= 0) { - nodes.removeIf(node -> { - if(node.isDir()) { - return false; - } - return node.getRank() > target.rank; - }); - } break; default: nodes.addAll(SchematicNode.list(user, parent == null?null:parent.getId())); @@ -518,6 +510,7 @@ public class SchematicSelector { private final Target target; private final SchematicType type; + @Deprecated private final int rank; }