SteamWar/SpigotCore
Archiviert
13
0
Dieser Commit ist enthalten in:
Chaoscaot 2021-01-26 00:16:05 +01:00
Ursprung 5d96c5a084
Commit 0895035b08

Datei anzeigen

@ -57,8 +57,8 @@ public class SchematicNode {
return getSchematicNode(owner, name, type, parent.getId());
}
public static List<SchematicNode> getSchematicNodeInNode(int owner, int parent) {
ResultSet set = SQL.select("SELECT * FROM SchematicNode WHERE ParentNode = ? AND NodeOwner = ?", parent, owner);
public static List<SchematicNode> getSchematicNodeInNode(int parent) {
ResultSet set = SQL.select("SELECT * FROM SchematicNode WHERE ParentNode = ?", parent);
try {
List<SchematicNode> nodes = new ArrayList<>();
while (set.next())
@ -69,8 +69,8 @@ public class SchematicNode {
}
}
public static List<SchematicNode> getSchematicNodeInNode(int owner, SchematicNode parent) {
return getSchematicNodeInNode(owner, parent.getId());
public static List<SchematicNode> getSchematicNodeInNode(SchematicNode parent) {
return getSchematicNodeInNode(parent.getId());
}
public static SchematicNode getSchematicDirectory(int owner, String name, SchematicNode parent) {
@ -223,6 +223,9 @@ public class SchematicNode {
}
public void delete() {
if(isDir()) {
getSchematicNodeInNode(getId()).forEach(SchematicNode::delete);
}
SQL.update("DELETE FROM SchematicNode WHERE NodeId = ?", id);
}
}