diff --git a/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/SchematicCommand.java b/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/SchematicCommand.java index a2a33f5..703779d 100644 --- a/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/SchematicCommand.java +++ b/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/SchematicCommand.java @@ -158,9 +158,14 @@ public class SchematicCommand extends SWCommand { SchematicNode currentNode = mkdirs(layers, user, 1); 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; + if (node != null) { + if(node.isDir()) { + player.sendMessage(SchematicSystem.PREFIX + "§cDie Schematic ist ein Ordner"); + return; + } else if (!node.getSchemtype().writeable() || node.getOwner() != user.getId()) { + player.sendMessage(SchematicSystem.PREFIX + "§cDu darfst diese Schematic nicht überschreiben"); + return; + } } boolean newSchem = false;