Posted March 24, 2017 (edited) Hello friends of wurm here i speak about the announcer mod and would need some little help With this all other players get an info if a new player is loging in MessageServer.broadCastSafe("Spieler " + player.getName() + " hat sich eingeloggt.", (byte) 1); Now i like to know, how i can send a announce at the same time to the new loged in Player, like "Welcome playername"? Next is, i read about you can change the textcolor with html tags in java, how would this work or is there another option? Last but not least, have you a little hint for me, how i can announce a text from a properties file? i tried that but it seems not working for me atm ^^ Eject Edited March 24, 2017 by Eject Share this post Link to post Share on other sites
Posted March 24, 2017 (edited) with the message from the propertiesfile i get always a little error, maybe a very little ^^ in porperties i added: announceMessage="This is a test" in the classfile i added: at public class boolean announceMessage; at configure method: this.announceMessage = Boolean.valueOf(properties.getProperty("announceMessage", String.valueOf(this.announceMessage))).booleanValue(); and at the output under the other message MessageServer.broadCastSafe(this.announceMessage + ".", (byte) 1); Server is starting but with the one client i see something like this: Player Eject has logged in False where is the issue? ^^ Eject edit: ok i forget =true at the boolean but still the same issue announceMessage="blah blah" dont work announceMessage=bla blah also dont work ^^ Edited March 24, 2017 by Eject Share this post Link to post Share on other sites
Posted March 24, 2017 Privet Comrade, you should take a look at this, even in your language: https://de.wikibooks.org/wiki/Java_Standard:_Primitive_Datentypen Looks like you are using a boolean instead of a string )))) btw, message to a single player works like this: player.getCommunicator().sendNormalServerMessage(string) 1 Share this post Link to post Share on other sites
Posted March 24, 2017 (edited) Thank you it works now =) ...and i had to use the toString method this.announceMessage = String.valueOf(properties.getProperty("announceMessage", String.valueOf(this.announceMessage))).toString(); . . MessageServer.broadCastSafe("..." + announceMessage + "...", (byte) 1); Edit: for reading the text from the properties file Eject Edited March 24, 2017 by Eject 1 Share this post Link to post Share on other sites
Posted March 24, 2017 this works too (sending text to the event window if a player logged in)...bad i cant figure out how to send it via broadcast just to the player, but ok....the message would be shown for a too short time, not good if you announce ts3 ip and website player.getCommunicator().sendNormalServerMessage( "" + announceMessage + "", (byte) 1); Eject Share this post Link to post Share on other sites