From 8c905ceacfbf386d7e688a1657c74991806e8e0d Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Tue, 28 Dec 2021 19:52:02 +0100 Subject: [PATCH] Hotfix schemSave 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 1f5d407..be665e4 100644 --- a/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/SchematicCommand.java +++ b/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/SchematicCommand.java @@ -144,8 +144,8 @@ public class SchematicCommand extends SWCommand { if (invalidSchemName(player, layers)) return; SchematicNode currentNode = mkdirs(layers, user, 1); - SchematicNode node = SchematicNode.getSchematicNode(layers[layers.length - 1], currentNode == null ? 0 : currentNode.getId()); - if (node != null && !node.getSchemtype().writeable()) { + SchematicNode node = SchematicNode.getNodeFromPath(user, String.join("/", layers)); + if (node != null && !node.getSchemtype().writeable() && node.getOwner() != user.getId()) { player.sendMessage(SchematicSystem.PREFIX + "§cDu darfst diese Schematic nicht überschreiben"); return; }