Maxwell
10/20/2019 - 7:13 AM

On Chat Listener

@SubscribeEvent
    public void onChat(ClientChatReceivedEvent event) {
        String message = event.message.getUnformattedText(); // The message recieved
        if(message.contains("string")) {
            Minecraft.getMinecraft().thePlayer.sendChatMessage(""); // Send message or command
        }
    }