ÂLocalize disconnect reasons for RakLib disconnects

This commit is contained in:
Dylan K. Taylor
2023-02-13 14:10:25 +00:00
parent 525f62e1e4
commit 886b40a455
6 changed files with 30 additions and 10 deletions

View File

@ -668,7 +668,7 @@ class NetworkSession{
* Called by the network interface to close the session when the client disconnects without server input, for
* example in a timeout condition or voluntary client disconnect.
*/
public function onClientDisconnect(string $reason) : void{
public function onClientDisconnect(Translatable|string $reason) : void{
$this->tryDisconnect(function() use ($reason) : void{
if($this->player !== null){
$this->player->onPostDisconnect($reason, null);