Posted February 14, 201510 yr I am new to modding but I am making a custom sword that strikes entity's with lightning when hit. I am able to dissable the function with the L key but I want to show a chat message when activated. Please help
February 14, 201510 yr or player.sendChatMessage(String) if you just want to send a string. (works only by EntityPlayerSP)
February 16, 201510 yr Author send chat message doesn't work the error is :The method sendChatMessage(String) is undefined for the type EntityPlayerSP.
February 16, 201510 yr Author can you please give me an examplecode of a method thats sends a chat message
February 16, 201510 yr player.addChatMessage(new ChatComponentText("Learn Java.")); Maker of the Craft++ mod.
February 16, 201510 yr To get the player object, you first need to learn Java, and then suddenly realise it's magic, and you get it by using the parameters of the method. Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support. 1.12 -> 1.13 primer by williewillus. 1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support. http://www.howoldisminecraft1710.today/
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.