mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-23 00:55:57 +00:00
Don't hold player references for hiddenPlayers
they aren't needed, and this is just one more thing that could go wrong in Player->close() that could lead to leaks.
This commit is contained in:
parent
119913da30
commit
ebcce43131
@ -264,7 +264,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
||||
protected $loadQueue = [];
|
||||
protected $nextChunkOrderRun = 5;
|
||||
|
||||
/** @var Player[] */
|
||||
/** @var bool[] map: raw UUID (string) => bool */
|
||||
protected $hiddenPlayers = [];
|
||||
|
||||
/** @var Vector3|null */
|
||||
@ -503,7 +503,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
||||
if($player === $this){
|
||||
return;
|
||||
}
|
||||
$this->hiddenPlayers[$player->getRawUniqueId()] = $player;
|
||||
$this->hiddenPlayers[$player->getRawUniqueId()] = true;
|
||||
$player->despawnFrom($this);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user