mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-26 06:22:17 -08:00
Add PlayerChatEvent on clients (#8432)
* Add PlayerChatEvent on clients
d32dd01097
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:
parent
2b11e1fb1e
commit
cdb9fa0d7d
1 changed files with 3 additions and 1 deletions
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue