Jump to content

Recommended Posts

Posted

Hey there, I'm currently working on a prefixing plugin, but I'm currently stuck with a username problem.

 

Currently I have to insert the prefix into the username, which is obviously a no-no because it causes the client to crash for having a username greater than 16 characters. So far I've determine that by implementing IChatListener I can modify the message and I can get the player with the NetHandler, but I cannot find a way to modify the rest of the message. So let me provide some examples:

 

Normal Chat: <Favorlock> message

 

Desired Chat: [prefix] <Favorlock> message

 

If possible I would like to change the brackets around the username as well, but seeing as I can't find a way to edit anything but the username and the message I'm at a loss. Any suggestions, tips, pointers? Anything would be appreciated.

Posted

Yeah, I finally got it to work. I didn't quite grasp how to use it properly when I first tried but then by going through some of the minecraft code trying to understand the chat system finally understood how it all worked. Works great now. My chat prefixing mod works perfectly with the permission system my friend and I wrote.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.