Jump to content

[1.8] Check when client sends message


Ozcr
 Share

Recommended Posts

Hey, I'm trying to code a Mod where it will adjust the message that the client sends before it is sent to the server.

 

I've tried using ServerChatEvent but this only fires when the server with my mod recieves a message packet. I was wondering if there is any Event's that fire when the client sends a chat message on any type of server including non-forge servers.

 

Thanks!

Link to comment
Share on other sites

Why?

it will adjust the message that the client sends before it is sent to the server.

 

No, there is no such event.

It is possible tho.

You can use KeyboardEvent to track if client pressed "enter" && "currentScreen instanceof GuiChat"

That way you can pull out textfield with String typed and edit it before performing "enter".

You might need reflection to access textfield, I don't remember.

 

1.7.10 is no longer supported by forge, you are on your own.

Link to comment
Share on other sites

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

 Share



×
×
  • Create New...

Important Information

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