From 6dac8bd2218958c623165a7928f3e92024bae489 Mon Sep 17 00:00:00 2001 From: xgraza Date: Sun, 25 Jan 2026 03:25:59 -0600 Subject: [PATCH 1/2] fix: Attempting to set alpha sets it to 0 when set through command line --- .../oyvey/features/commands/argument/ColorArgumentType.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/me/alpha432/oyvey/features/commands/argument/ColorArgumentType.java b/src/main/java/me/alpha432/oyvey/features/commands/argument/ColorArgumentType.java index 97af0e7..e4c425e 100644 --- a/src/main/java/me/alpha432/oyvey/features/commands/argument/ColorArgumentType.java +++ b/src/main/java/me/alpha432/oyvey/features/commands/argument/ColorArgumentType.java @@ -73,7 +73,7 @@ public class ColorArgumentType implements ArgumentType { } int[] elements = new int[parts.length]; - for (int i = 0; i < 3; ++i) { + for (int i = 0; i < parts.length; ++i) { elements[i] = Integer.parseInt(parts[i]); } return elements; From c024fcdf6516873a3ffa870d19c3ae79ac76410e Mon Sep 17 00:00:00 2001 From: xgraza Date: Sun, 25 Jan 2026 03:26:29 -0600 Subject: [PATCH 2/2] fix: Add more documentation for user when incorrectly inputting color value --- .../oyvey/features/commands/argument/ColorArgumentType.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/me/alpha432/oyvey/features/commands/argument/ColorArgumentType.java b/src/main/java/me/alpha432/oyvey/features/commands/argument/ColorArgumentType.java index e4c425e..c1c7be2 100644 --- a/src/main/java/me/alpha432/oyvey/features/commands/argument/ColorArgumentType.java +++ b/src/main/java/me/alpha432/oyvey/features/commands/argument/ColorArgumentType.java @@ -68,7 +68,7 @@ public class ColorArgumentType implements ArgumentType { private int[] parseColorElements(StringReader reader, String value) throws CommandSyntaxException { String[] parts = value.split(","); if (parts.length < 3) { - throw CommandExceptions.invalidArgument("Color element must have three values, either RGB or hsb:HSB") + throw CommandExceptions.invalidArgument("Color element must have three values (with optional alpha value), either RGB(A) or hsb:HSB") .createWithContext(reader); }