From 5a778547525e6c934afa277d362f9c10729b6f26 Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Mon, 14 Jul 2025 11:20:26 +0200 Subject: [PATCH] Fix replaceColor usage and correct config flag handling --- CommonCore/SQL/src/de/steamwar/sql/SchematicNode.java | 2 +- .../commands/schematiccommand/SchematicCommandUtils.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CommonCore/SQL/src/de/steamwar/sql/SchematicNode.java b/CommonCore/SQL/src/de/steamwar/sql/SchematicNode.java index 1bfa1f9e..e355419b 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/SchematicNode.java +++ b/CommonCore/SQL/src/de/steamwar/sql/SchematicNode.java @@ -467,7 +467,7 @@ public class SchematicNode { } public boolean getConfig(ConfigFlags flag) { - return (config & (1 << flag.ordinal())) == 1; + return (config & (1 << flag.ordinal())) != 0; } public void setConfig(ConfigFlags flag, boolean value) { diff --git a/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/SchematicCommandUtils.java b/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/SchematicCommandUtils.java index b7b61084..ad1ced2e 100644 --- a/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/SchematicCommandUtils.java +++ b/SchematicSystem/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/SchematicCommandUtils.java @@ -492,7 +492,7 @@ public class SchematicCommandUtils { node.setAllowReplay(!node.allowReplay()); submitSchemGUI(player, node, type); }); - inv.setItem(1, SWItem.getMaterial(node.replaceColor() ? "PINK_WOOL" : "LIGHT_GRAY_WOOL"), SchematicSystem.MESSAGE.parse(node.allowReplay()?"UTIL_SUBMIT_COLOR_ON":"UTIL_SUBMIT_COLOR_OFF", player), click -> { + inv.setItem(1, SWItem.getMaterial(node.replaceColor() ? "PINK_WOOL" : "LIGHT_GRAY_WOOL"), SchematicSystem.MESSAGE.parse(node.replaceColor()?"UTIL_SUBMIT_COLOR_ON":"UTIL_SUBMIT_COLOR_OFF", player), click -> { node.setReplaceColor(!node.replaceColor()); submitSchemGUI(player, node, type); });