Add PlayerChatEvent on clients (#8432)
* Add PlayerChatEvent on clients https://github.com/mindustry-antigrief/mindustry-client/commit/d32dd01097ef62fb0a1bd5aade2a738c04652854 Co-authored-by: buthed010203 <naguiar010203@gmail.com> * Only fire when valid. (Currently deciding on whether or not to add ChatEvent without the player.) --------- Co-authored-by: buthed010203 <naguiar010203@gmail.com>
This commit is contained in:
co-authored by
buthed010203
parent
2b11e1fb1e
commit
cdb9fa0d7d
@@ -201,10 +201,12 @@ public class NetClient implements ApplicationListener{
|
||||
Sounds.chatMessage.play();
|
||||
}
|
||||
|
||||
//display raw unformatted text above player head
|
||||
if(playersender != null && unformatted != null){
|
||||
//display raw unformatted text above player head
|
||||
playersender.lastText(unformatted);
|
||||
playersender.textFadeTime(1f);
|
||||
|
||||
Events.fire(new PlayerChatEvent(playersender, unformatted));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user