diff --git a/SpigotCore_Main/src/de/steamwar/sql/Schematic.java b/SpigotCore_Main/src/de/steamwar/sql/Schematic.java index efe4b66..ac3cd46 100644 --- a/SpigotCore_Main/src/de/steamwar/sql/Schematic.java +++ b/SpigotCore_Main/src/de/steamwar/sql/Schematic.java @@ -28,7 +28,9 @@ import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; import java.util.List; +import java.util.Optional; import java.util.UUID; +import java.util.stream.Collectors; @Deprecated public class Schematic { @@ -61,6 +63,11 @@ public class Schematic { SchematicNode node = SchematicNode.getSchematicNode(schemOwner, schemName, 0); if(node != null) { return new Schematic(node); + } else { + Optional n = SchematicNode.getSchematicsAccessibleByUser(schemOwner, 0).stream().filter(node1 -> node1.getName().equals(schemName)).findAny(); + if(n.isPresent()) { + return new Schematic(n.get()); + } } return null; }