Schemnodes Schematic System #93
@ -44,6 +44,11 @@ public class GUI {
|
||||
|
||||
private static void list(Player player) {
|
||||
SchematicSelector selector = new SchematicSelector(player, SchematicSelector.selectSchematic(), new SchematicSelectorInjectable() {
|
||||
@Override
|
||||
public String createTitle(Player player) {
|
||||
return "Schematic GUI: {1}";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onListRender(SchematicSelector selector, SWListInv<SchematicNode> inv, SchematicNode parent) {
|
||||
if(parent == null) {
|
||||
@ -54,11 +59,8 @@ public class GUI {
|
||||
});
|
||||
}
|
||||
}
|
||||
}, node -> {
|
||||
info(player, node);
|
||||
});
|
||||
}, node -> info(player, node));
|
||||
selector.setSingleDirOpen(false);
|
||||
selector.setTitle(player1 -> "Schematic GUI: {1}");
|
||||
selector.open();
|
||||
}
|
||||
|
||||
|
@ -405,11 +405,6 @@ public class SchematicCommand extends SWCommand {
|
||||
return;
|
||||
}
|
||||
|
||||
if(SchematicNode.getAllParentsOfNode(node).contains(node)) {
|
||||
player.sendMessage(SchematicSystem.PREFIX + "§cDas kann nur Fehler machen, vertrau mir!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (name.equals("/")) {
|
||||
node.setParent(0);
|
||||
} else {
|
||||
@ -418,6 +413,10 @@ public class SchematicCommand extends SWCommand {
|
||||
String[] layers = name.split("/");
|
||||
if (invalidSchemName(player, layers)) return;
|
||||
SchematicNode newNode = mkdirs(layers, user, 0);
|
||||
if(SchematicNode.getAllParentsOfNode(newNode).contains(node)) {
|
||||
player.sendMessage(SchematicSystem.PREFIX + "§cDas kann nur Fehler machen, vertrau mir!");
|
||||
return;
|
||||
}
|
||||
node.setParent(newNode.getId());
|
||||
}
|
||||
player.sendMessage(SchematicSystem.PREFIX + "§7Die Schematic ist nun unter §e" + node.generateBreadcrumbs(user) + " §7zu finden");
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren