Posted July 14, 20223 yr How can I send a message to all players as me by my mode? What should i use and import? Edited July 14, 20223 yr by Gumanat
July 14, 20223 yr Author 16 minutes ago, diesieben07 said: PlayerList#broadcastSystemMessage @EventHandler public void onServerChat(ServerChatEvent event) { PlayerList#broadcastSystemMessage; } is it correct? How to paste text there? Its not working: "Syntax error on token "Invalid Character", delete this token".
July 14, 20223 yr Author 1 minute ago, diesieben07 said: Please learn basic Java. I ask on the FORGE forum for a question about FORGE
July 14, 20223 yr Author 1 minute ago, diesieben07 said: And you have been given an answer. So how to send message?
July 14, 20223 yr Author 2 minutes ago, diesieben07 said: You call this method. Please tell me more i so need it. How to put text there?
July 14, 20223 yr Author 2 minutes ago, diesieben07 said: You call this method. why is there "#"? I saw on forums that i need write server.getMinecraft().getPlayersList.sendMessage("text") but it was not working
July 14, 20223 yr Author 14 minutes ago, diesieben07 said: Please learn basic Java. no its just error, not basic java🤣 you just gave me bad answer sorry Edited July 14, 20223 yr by Gumanat
July 14, 20223 yr https://www.baeldung.com/java-method-in-javadoc#referencing-a-method-in-another-class ClassName#method is the javadoc name for the method ClassName.method() @diesieben07 told you it confuses people who don't write java professionally 🙂 Boilerplate: If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one. If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install Large files should be posted to a file sharing site like https://gist.github.com You should also read the support forum sticky post.
July 14, 20223 yr Author 4 minutes ago, warjort said: https://www.baeldung.com/java-method-in-javadoc#referencing-a-method-in-another-class ClassName#method is the javadoc name for the method ClassName.method() @diesieben07 told you it confuses people who don't write java professionally 🙂 Multiple markers at this line - Syntax error, insert ")" to complete NormalAnnotation - Syntax error, insert ";" to complete LocalVariableDeclarationStatement - Syntax error, insert "VariableDeclarators" to complete LocalVariableDeclaration - Syntax error, insert "}" to complete BlockStatements - Syntax error on token "Invalid Character", @ expected - Syntax error, insert "[ ]" to complete Dimension
July 14, 20223 yr Author 8 minutes ago, warjort said: https://www.baeldung.com/java-method-in-javadoc#referencing-a-method-in-another-class ClassName#method is the javadoc name for the method ClassName.method() @diesieben07 told you it confuses people who don't write java professionally 🙂 why you just cant give me normal answer? Im not pro in Java. Why is there "#"? I dont need this. I need an ordinary example as it "player.sendMessage(new TextComponentString("This is sendmessage example string."));" i need function that can get argument - text. Can you give me an working example please? Without difficult examples
July 14, 20223 yr If you don't figure it for yourself and understand it, how will you know the code is correct? How will you fix bugs when it breaks? We are here to answer questions about forge, not teach you java or fix your code. Here is what you asked for, but how do you know I am correct? 🙂 // First navigate to the class you were told to use PlayerList players = chatEvent.getPlayer().server.getPlayerList(); // Now send use the method you were told about players.broadcastSystemMessage(Component.literal("Hello"), ChatType.SYSTEM); Boilerplate: If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one. If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install Large files should be posted to a file sharing site like https://gist.github.com You should also read the support forum sticky post.
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.