Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

I'm currently updating my mod from 1.5.2 and one of the features it provides is nickname support in chat.  In the past I had setup a listener for ServerChatEvents and did the substitution there by changing the "line" member.  Now in 1.6.2 the "line" member is no longer present and after quite a bit of digging I've yet to find a way to modify the message before it gets sent to the players.  Not sure if I'm missing something obvious or if I'm just approaching this the wrong way entirely.  Any ideas?

 

What diesieben07 said should work, but i already had this written out so i figured i might as well as post it.

 

I had a problem similar to this a couple of days ago, and i got around it by making an access transformer that changed the username in the ServerChatEvent to be not final. (This tutorial is a little confusing in the middle, but it helps: http://www.minecraftforge.net/wiki/Using_Access_Transformers )

 

That worked pretty well.

 

I would however recommend using diesieben07's way if it it works for you as this way is a little more complicated and probably shouldn't be used unless absolutely necessary...

-d4rkfly3r

@diesieben07

To be honest, i thought the same thing at first, but it works fine for me, though when i get home from work, i am going to try it your way, because it makes everything a lot easier.

 

-d4rkfly3r

I screwed up, i was looking at my old code, what i actually ended up doing was listening for when the client recived the chat and the i edited the message then, cancelled the event, then called it again with my custom message.

 

But i dont recommend using this way

 

-d4rkfly3r

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.