PastebinNotWorking10

KeyInputHandler

Jul 5th, 2017
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. package com.XxDanielMCYTxX.hypixelchat1;
  2.  
  3. import net.minecraft.client.Minecraft;
  4.  
  5. import net.minecraftforge.client.ClientCommandHandler;
  6. import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
  7. import net.minecraftforge.fml.common.gameevent.InputEvent.KeyInputEvent;
  8.  
  9. public class KeyInputHandler
  10. {
  11. @SubscribeEvent
  12. public void onKeyInput(KeyInputEvent event)
  13. {
  14. if (Keybinds.hello.isPressed())
  15. {
  16. Minecraft.getMinecraft().thePlayer.sendChatMessage("/chat p");
  17. // Which one of those Codes Suppose to send to the server?
  18. // The Custom Command i wanna send to the server "/chat p" which Switches Chats on that specific Server.
  19. ClientCommandHandler.instance.executeCommand(Minecraft.getMinecraft().thePlayer, "/chat p");
  20. }
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment