aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/com/raeids/stratus/mixin/GuiChatMixin.java10
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;
+
+ }
}