Skip to content

Commit

Permalink
Fix attribute value parser discarding input after first whitespace (#138
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Grabsky authored Jul 18, 2024
1 parent 251f2c1 commit 462ce4d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public String parseAttributeValue(final CommandContext<CommandSender> 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()));
Expand Down

0 comments on commit 462ce4d

Please sign in to comment.