SteamWar/SpigotCore
Archiviert
13
0

More Fixes
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: Chaoscaot <chaoscaot444@gmail.com>
Dieser Commit ist enthalten in:
Chaoscaot 2021-12-11 12:58:09 +01:00
Ursprung d1ca48436c
Commit 72708d7183

Datei anzeigen

@ -56,7 +56,7 @@ public class SchematicSelector {
private boolean sdoTrigger = false; private boolean sdoTrigger = false;
@Getter @Getter
@Setter @Setter
private int openedDirs = 0; private int depth = 0;
public SchematicSelector(Player player, SelectorTarget target, Consumer<SchematicNode> callback) { public SchematicSelector(Player player, SelectorTarget target, Consumer<SchematicNode> callback) {
this.player = player; this.player = player;
@ -90,7 +90,7 @@ public class SchematicSelector {
List<SWListInv.SWListEntry<SchematicNode>> list = new ArrayList<>(); List<SWListInv.SWListEntry<SchematicNode>> 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)); 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) { private void handleClick(SchematicNode node, SchematicNode parent) {
if(node == null) { if(node == null) {
openedDirs--; depth--;
if(!singleDirOpen) { if(!singleDirOpen) {
if(NodeMember.getNodeMember(parent.getId(), user.getId()) != null) { if(NodeMember.getNodeMember(parent.getId(), user.getId()) != null) {
openList(null); openList(null);
@ -165,7 +165,7 @@ public class SchematicSelector {
return; return;
} }
filter.reset(); filter.reset();
openedDirs++; depth++;
openList(node); openList(node);
return; return;
} }
@ -320,7 +320,7 @@ public class SchematicSelector {
nodes.removeIf(node -> !node.isDir()); nodes.removeIf(node -> !node.isDir());
} }
if(target.target == Target.SCHEMATIC_TYPE) { 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; return nodes;
} }