From 0f917ac4f68abcba4b515032e4ad4ec164118a5c Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Sat, 20 Nov 2021 14:43:09 +0100 Subject: [PATCH] Hotfix Member Schematics Info Signed-off-by: Chaoscaot --- SpigotCore_Main/src/de/steamwar/sql/Schematic.java | 7 +++++++ 1 file changed, 7 insertions(+) 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; }