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:
@@ -201,10 +201,12 @@ public class NetClient implements ApplicationListener{
|
|||||||
Sounds.chatMessage.play();
|
Sounds.chatMessage.play();
|
||||||
}
|
}
|
||||||
|
|
||||||
//display raw unformatted text above player head
|
|
||||||
if(playersender != null && unformatted != null){
|
if(playersender != null && unformatted != null){
|
||||||
|
//display raw unformatted text above player head
|
||||||
playersender.lastText(unformatted);
|
playersender.lastText(unformatted);
|
||||||
playersender.textFadeTime(1f);
|
playersender.textFadeTime(1f);
|
||||||
|
|
||||||
|
Events.fire(new PlayerChatEvent(playersender, unformatted));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user