From e36b2ce8307090a025b6af78b4221880bfe224af Mon Sep 17 00:00:00 2001 From: Zailer43 Date: Sat, 14 Sep 2024 17:01:54 -0300 Subject: [PATCH] Fix: Adding a space at the end of the `/fzmm` command will no longer cause an error when executing the command --- .../modify_fzmm_command/modify_chat/ChatScreenMixin.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/fzmm/zailer/me/mixin/modify_fzmm_command/modify_chat/ChatScreenMixin.java b/src/main/java/fzmm/zailer/me/mixin/modify_fzmm_command/modify_chat/ChatScreenMixin.java index eb01ce72..39fec801 100644 --- a/src/main/java/fzmm/zailer/me/mixin/modify_fzmm_command/modify_chat/ChatScreenMixin.java +++ b/src/main/java/fzmm/zailer/me/mixin/modify_fzmm_command/modify_chat/ChatScreenMixin.java @@ -53,8 +53,9 @@ public abstract class ChatScreenMixin { @ModifyReturnValue(method = "normalize", at = @At(value = "RETURN")) private String fzmm$avoidNormalizeWithFzmmCommand(String str) { - if (this.fzmm$isFzmmCommand(str)) - return this.chatField.getText(); + if (this.fzmm$isFzmmCommand(str)) { + return this.chatField.getText().trim(); + } return str; }