From 0ff834a4d0ad653e0f0415f6843d08878c792801 Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Sat, 20 Nov 2021 17:39:30 +0100 Subject: [PATCH] Hotfix Update ParentNode FK Fail Signed-off-by: Chaoscaot --- SpigotCore_Main/src/de/steamwar/sql/SchematicNode.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SpigotCore_Main/src/de/steamwar/sql/SchematicNode.java b/SpigotCore_Main/src/de/steamwar/sql/SchematicNode.java index 70a4b8a..a50b48d 100644 --- a/SpigotCore_Main/src/de/steamwar/sql/SchematicNode.java +++ b/SpigotCore_Main/src/de/steamwar/sql/SchematicNode.java @@ -94,6 +94,9 @@ public class SchematicNode { owner = set.getInt("NodeOwner"); name = set.getString("NodeName"); parent = set.getInt("ParentNode"); + if(set.wasNull()) { + parent = null; + } item = set.getString("NodeItem"); type = set.getString("NodeType"); lastUpdate = set.getTimestamp("LastUpdate"); @@ -417,6 +420,7 @@ public class SchematicNode { } public SchematicNode getParentNode() { + if(parent == null) return null; return SchematicNode.getSchematicNode(parent); }