SteamWar/SpigotCore
Archiviert
13
0

Schematic Nodes #90

Zusammengeführt
Lixfel hat 48 Commits von schematic-node nach master 2021-11-20 13:12:32 +01:00 zusammengeführt
Nur Änderungen aus Commit 0895035b08 werden angezeigt - Alle Commits anzeigen

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);
}
}