Some Fixes for SchematicSelector #140
@ -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<SchematicNode> callback) {
|
||||
this.player = player;
|
||||
@ -90,7 +90,7 @@ public class SchematicSelector {
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren