From 72708d7183567e8480d63b596960b0e4c90c0c59 Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Sat, 11 Dec 2021 12:58:09 +0100 Subject: [PATCH] More Fixes Signed-off-by: Chaoscaot --- .../src/de/steamwar/inventory/SchematicSelector.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/SpigotCore_Main/src/de/steamwar/inventory/SchematicSelector.java b/SpigotCore_Main/src/de/steamwar/inventory/SchematicSelector.java index 4634738..ca508f6 100644 --- a/SpigotCore_Main/src/de/steamwar/inventory/SchematicSelector.java +++ b/SpigotCore_Main/src/de/steamwar/inventory/SchematicSelector.java @@ -56,7 +56,7 @@ public class SchematicSelector { private boolean sdoTrigger = false; @Getter @Setter - private int openedDirs = 0; + private int depth = 0; public SchematicSelector(Player player, SelectorTarget target, Consumer callback) { this.player = player; @@ -90,7 +90,7 @@ public class SchematicSelector { List> list = new ArrayList<>(); - if(parent != null && openedDirs != 0) { + if(depth != 0) { list.add(new SWListInv.SWListEntry<>(new SWItem(Material.ARROW, Core.MESSAGE.parse("SCHEM_SELECTOR_BACK", player), clickType -> {}), null)); } @@ -130,7 +130,7 @@ public class SchematicSelector { private void handleClick(SchematicNode node, SchematicNode parent) { if(node == null) { - openedDirs--; + depth--; if(!singleDirOpen) { if(NodeMember.getNodeMember(parent.getId(), user.getId()) != null) { openList(null); @@ -165,7 +165,7 @@ public class SchematicSelector { return; } filter.reset(); - openedDirs++; + depth++; openList(node); return; } @@ -320,7 +320,7 @@ public class SchematicSelector { nodes.removeIf(node -> !node.isDir()); } if(target.target == Target.SCHEMATIC_TYPE) { - nodes.removeIf(node -> node.isDir() || !node.getType().equals(target.type.toDB())); + nodes.removeIf(node -> node.isDir() || !node.getSchemtype().equals(target.type)); } return nodes; }