forked from SteamWar/SteamWar
Fix replaceColor usage and correct config flag handling
This commit is contained in:
@@ -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) {
|
||||
|
||||
+1
-1
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user