mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-21 18:36:40 +00:00
Player: Fixed memory leak when PlayerLoginEvent is cancelled
This commit is contained in:
parent
7bd9a2b2e0
commit
2c678dcf0d
@ -2101,6 +2101,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
||||
/** @var float[] $pos */
|
||||
$pos = $this->namedtag->getListTag("Pos")->getAllValues();
|
||||
$this->level->registerChunkLoader($this, ((int) floor($pos[0])) >> 4, ((int) floor($pos[2])) >> 4, true);
|
||||
$this->usedChunks[Level::chunkHash(((int) floor($pos[0])) >> 4, ((int) floor($pos[2])) >> 4)] = false;
|
||||
|
||||
parent::__construct($this->level, $this->namedtag);
|
||||
$ev = new PlayerLoginEvent($this, "Plugin reason");
|
||||
|
Loading…
x
Reference in New Issue
Block a user