From 8322f64182abc64512d4c6ed77ad2169a80c5128 Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Tue, 28 Dec 2021 17:03:42 +0100 Subject: [PATCH] Hotfix Schem Save Signed-off-by: Chaoscaot --- .../steamwar/schematicsystem/commands/SchematicCommand.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/SchematicCommand.java b/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/SchematicCommand.java index d9fd022..1b1e57f 100644 --- a/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/SchematicCommand.java +++ b/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/SchematicCommand.java @@ -118,9 +118,9 @@ public class SchematicCommand extends SWCommand { public void saveSchem(Player player) { SchematicSelector selector = new SchematicSelector(player, SchematicSelector.selectSchematicNode(), schematicNode -> { SteamwarUser user = SteamwarUser.get(player.getUniqueId()); - if(schematicNode.isDir()) { + if(schematicNode == null || schematicNode.isDir()) { SWAnvilInv anvilInv = new SWAnvilInv(player, "Namen eingeben"); - anvilInv.setCallback(s -> saveSchem(player, schematicNode.generateBreadcrumbs(user) + s)); + anvilInv.setCallback(s -> saveSchem(player, schematicNode==null?s:(schematicNode.generateBreadcrumbs(user) + s))); anvilInv.setItem(Material.CAULDRON); anvilInv.open(); } else {