Posted July 3, 20223 yr @SubscribeEvent public void onInteract(PlayerInteractEvent event) { if (event.action == PlayerInteractEvent.Action.LEFT_CLICK_BLOCK) { ChatUtils.addChatMessage("LEFT CLICK"); } } and this code only work in single player, how can i fix it?
July 3, 20223 yr Author public static void addChatMessage(String Message) { Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(Message)); }
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.