diff options
author | raeids <95222726+raeids@users.noreply.github.com> | 2021-12-23 00:20:24 +0700 |
---|---|---|
committer | raeids <95222726+raeids@users.noreply.github.com> | 2021-12-23 00:20:24 +0700 |
commit | a0c5fb4852b8f6737e95898eb9d408cf5270cbca (patch) | |
tree | 1fd4b85822a2b806290d8a09eba44afff317736a /src/main | |
parent | 9a4918e4f18d07e7ddbe6278371d6d36ac25d8cf (diff) | |
download | Chatting-a0c5fb4852b8f6737e95898eb9d408cf5270cbca.tar.gz Chatting-a0c5fb4852b8f6737e95898eb9d408cf5270cbca.tar.bz2 Chatting-a0c5fb4852b8f6737e95898eb9d408cf5270cbca.zip |
barebones chat shortcuts
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/com/raeids/stratus/mixin/GuiChatMixin.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/com/raeids/stratus/mixin/GuiChatMixin.java b/src/main/java/com/raeids/stratus/mixin/GuiChatMixin.java index 2e46980..e0a2161 100644 --- a/src/main/java/com/raeids/stratus/mixin/GuiChatMixin.java +++ b/src/main/java/com/raeids/stratus/mixin/GuiChatMixin.java @@ -12,6 +12,7 @@ import org.lwjgl.input.Mouse; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.ModifyArg; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import java.awt.*; @@ -78,4 +79,13 @@ public abstract class GuiChatMixin extends GuiScreen { } } } + @ModifyArg(method = "keyTyped", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/GuiChat;sendChatMessage(Ljava/lang/String;)V"), index = 0) + private String modifySentMessage(String original){ + if(original.equalsIgnoreCase ("/pw")){ + return "/p warp"; + + } + return original; + + } } |