From 3de4b3871d5eeebe865ae909fd2971f5f54dffe6 Mon Sep 17 00:00:00 2001 From: YoyoNow Date: Tue, 11 Nov 2025 21:42:38 +0100 Subject: [PATCH] Hotfix ModifyPart --- .../commands/schematiccommand/parts/ModifyPart.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/parts/ModifyPart.java b/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/parts/ModifyPart.java index 2d17ba73..1dab46dc 100644 --- a/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/parts/ModifyPart.java +++ b/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/parts/ModifyPart.java @@ -51,18 +51,19 @@ public class ModifyPart extends SWCommand { public void changeType(Player player, @Validator("isOwnerSchematicValidator") SchematicNode node) { TextComponent base = new TextComponent(); - Clipboard clipboard = null; + Clipboard clipboard; try { clipboard = new SchematicData(node).load(); - } catch (IOException ignored) { } - - Clipboard finalClipboard = clipboard; + } catch (IOException ignored) { + SchematicSystem.MESSAGE.send("UTIL_LOAD_ERROR", player); + return; + } String breadcrumb = node.generateBreadcrumbs(SteamwarUser.get(player.getUniqueId())); SchematicType.values().parallelStream() .filter(SchematicType::isAssignable) - .filter(type -> finalClipboard != null && SchematicSystem.getGameModeConfig(type) != null && AutoChecker.sizeCheck(finalClipboard, SchematicSystem.getGameModeConfig(type)).fastOk()) + .filter(type -> SchematicSystem.getGameModeConfig(type) == null || AutoChecker.sizeCheck(clipboard, SchematicSystem.getGameModeConfig(type)).fastOk()) .forEach(type -> { TextComponent component = new TextComponent(type.name() + " "); component.setColor(ChatColor.GRAY);