From a12e15266f27dd6565a6393dfd517c566f94974f Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Mon, 16 Jan 2023 16:33:17 +0100 Subject: [PATCH] Fixes "0 wird nicht benutzt" --- CommonCore | 2 +- .../src/de/steamwar/inventory/SchematicSelector.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CommonCore b/CommonCore index 27d6e9a..d30650b 160000 --- a/CommonCore +++ b/CommonCore @@ -1 +1 @@ -Subproject commit 27d6e9accfa14fa8d5c74ebbcad9d8c2f17767c7 +Subproject commit d30650bad30d53b5fb6c4e5c9499b71c577cf849 diff --git a/SpigotCore_Main/src/de/steamwar/inventory/SchematicSelector.java b/SpigotCore_Main/src/de/steamwar/inventory/SchematicSelector.java index 2bafb8d..8c7ed13 100644 --- a/SpigotCore_Main/src/de/steamwar/inventory/SchematicSelector.java +++ b/SpigotCore_Main/src/de/steamwar/inventory/SchematicSelector.java @@ -409,7 +409,7 @@ public class SchematicSelector { nodes.removeIf(node -> !node.isDir()); break; case SCHEMATIC_TYPE: - nodes.addAll(SchematicNode.accessibleByUserTypeMap(user, target.type).get(parent==null?0:parent.getId())); + nodes.addAll(SchematicNode.accessibleByUserTypeMap(user, target.type).get(parent==null?null:parent.getId())); if(target.rank >= 0) { nodes.removeIf(node -> { if(node.isDir()) { @@ -420,7 +420,7 @@ public class SchematicSelector { } break; default: - nodes.addAll(SchematicNode.list(user, parent == null?0:parent.getId())); + nodes.addAll(SchematicNode.list(user, parent == null?null:parent.getId())); } if(singleDirOpen && nodes.size() == 1 && nodes.get(0).isDir()) {