mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-03 00:29:54 +00:00
Player: Give me ALLLLL your crashdumps
I suspect this is going to cause a firestorm, but once it does we'll be able to see what needs fixing.
This commit is contained in:
parent
0ea166a551
commit
0eef634aab
@ -3398,8 +3398,6 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
|||||||
*/
|
*/
|
||||||
final public function close($message = "", string $reason = "generic reason", bool $notify = true) : void{
|
final public function close($message = "", string $reason = "generic reason", bool $notify = true) : void{
|
||||||
if($this->isConnected() and !$this->closed){
|
if($this->isConnected() and !$this->closed){
|
||||||
|
|
||||||
try{
|
|
||||||
if($notify and strlen($reason) > 0){
|
if($notify and strlen($reason) > 0){
|
||||||
$pk = new DisconnectPacket();
|
$pk = new DisconnectPacket();
|
||||||
$pk->message = $reason;
|
$pk->message = $reason;
|
||||||
@ -3420,12 +3418,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
|||||||
$this->server->broadcastMessage($ev->getQuitMessage());
|
$this->server->broadcastMessage($ev->getQuitMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
try{
|
|
||||||
$this->save();
|
$this->save();
|
||||||
}catch(\Throwable $e){
|
|
||||||
$this->server->getLogger()->critical("Failed to save player data for " . $this->getName());
|
|
||||||
$this->server->getLogger()->logException($e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if($this->isValid()){
|
if($this->isValid()){
|
||||||
@ -3467,6 +3460,8 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
|||||||
$this->server->removeOnlinePlayer($this);
|
$this->server->removeOnlinePlayer($this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->server->removePlayer($this);
|
||||||
|
|
||||||
$this->server->getLogger()->info($this->getServer()->getLanguage()->translateString("pocketmine.player.logOut", [
|
$this->server->getLogger()->info($this->getServer()->getLanguage()->translateString("pocketmine.player.logOut", [
|
||||||
TextFormat::AQUA . $this->getName() . TextFormat::WHITE,
|
TextFormat::AQUA . $this->getName() . TextFormat::WHITE,
|
||||||
$this->ip,
|
$this->ip,
|
||||||
@ -3480,11 +3475,6 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
|||||||
$this->perm->clearPermissions();
|
$this->perm->clearPermissions();
|
||||||
$this->perm = null;
|
$this->perm = null;
|
||||||
}
|
}
|
||||||
}catch(\Throwable $e){
|
|
||||||
$this->server->getLogger()->logException($e);
|
|
||||||
}finally{
|
|
||||||
$this->server->removePlayer($this);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user