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