Posted November 27, 201410 yr So, i thought, lets do this. I know how to program but i aint a pro. Lets start with something simple: Remove or change that simple message when the user logs in on the server. I'm talking about the "User joined the game" and "User left the game" message. Not that 'client side' MOTD message you get when u logon a server. I mean that message that is being broadcasted serverwide to all players. I want to customize that but it seems that the function responsible for that is the initializeConnectionToPlayer() function from the ServerConfigurationManager class. In version (MC 1.7.10) line 157 to 169 to be exactly. It prepares the chatcomponentTranslation and then sends it. In the beginning i stumbled upon those forge events and i instantly started looking up the reference for player login events. With no luck. I read about the ability of cancellation of events so that was really disappointing. So, my question is.. are we able to remove that message and replace it by my own? And i mean that one on line 169? this.sendChatMsg(chatcomponenttranslation); I just want to be pointed in the right direction. I noticed it is part of an abstract class. Thanks!
November 27, 201410 yr Author Aha, thanks. So basically what your solution does is catching and modifying the (from the server received) message on the client? (correct me if i'm wrong, i'm trying to understand the concept here). Am i forced to ship my mod to every client then? (I want the mod to be on the server only. Not really a client mod, but if there is no other way..). Edit: Oh wait a minute. I see ServerChatEvent too. Let's figure that out. Maybe i can catch it before it is even send to the clients. (that would be ideally)
November 28, 201410 yr Author I understand. Any reason why there is no hook over there? Would be great if modders could get control over that part too by an event. Without Netty the only 'neat' way to do it is create a coremod. Little too deep for me .
November 28, 201410 yr Just a thought, but can you change the message in the lang file itself? It seems that it is using multiplayer.player.joined or something like that. Check out my tutorials here: http://jabelarminecraft.blogspot.com/
November 28, 201410 yr Author Just a thought, but can you change the message in the lang file itself? It seems that it is using multiplayer.player.joined or something like that. That's right. I also thought about this but then i realized they hardcoded the color of the text.
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.