From 462ce4de13ad2193f2be107cae23be31aad65ec1 Mon Sep 17 00:00:00 2001 From: Grabsky <44530932+Grabsky@users.noreply.github.com> Date: Thu, 18 Jul 2024 11:58:42 +0200 Subject: [PATCH] Fix attribute value parser discarding input after first whitespace (#138) --- .../java/de/oliver/fancynpcs/commands/npc/AttributeCMD.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/de/oliver/fancynpcs/commands/npc/AttributeCMD.java b/src/main/java/de/oliver/fancynpcs/commands/npc/AttributeCMD.java index 102940cc..2b2068e2 100644 --- a/src/main/java/de/oliver/fancynpcs/commands/npc/AttributeCMD.java +++ b/src/main/java/de/oliver/fancynpcs/commands/npc/AttributeCMD.java @@ -88,7 +88,7 @@ public String parseAttributeValue(final CommandContext context, f // Getting the 'attribute' argument that should already exist within the command context. final NpcAttribute attribute = context.get("attribute"); // Reading the string, which is supposed to be an attribute name. - final String value = input.readString(); + final String value = input.read(input.remainingLength()); // Sending error message if attribute is null or cannot accept provided value. if (!attribute.isValidValue(value)) throw ReplyingParseException.replying(() -> translator.translate("command_invalid_attribute_value").replaceStripped("input", value).send(context.sender()));