mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-20 16:00:20 +00:00
Fixed permission-related memory leak
This commit is contained in:
parent
c07b0ff35b
commit
9fd6a695f6
@ -1059,6 +1059,9 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
|
||||
$revert = true;
|
||||
$this->nextChunkOrderRun = 0;
|
||||
}else{
|
||||
if($this->chunk instanceof FullChunk){
|
||||
$this->chunk->removeEntity($this);
|
||||
}
|
||||
$this->chunk = $chunk;
|
||||
}
|
||||
}
|
||||
@ -2340,12 +2343,18 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
|
||||
$this->loadQueue = [];
|
||||
$this->hasSpawned = [];
|
||||
$this->spawnPosition = null;
|
||||
$this->perm->clearPermissions();
|
||||
$this->perm = null;
|
||||
unset($this->buffer);
|
||||
}
|
||||
|
||||
$this->server->removePlayer($this);
|
||||
}
|
||||
|
||||
public function __debugInfo(){
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles player data saving
|
||||
*/
|
||||
|
@ -176,6 +176,7 @@ abstract class Entity extends Location implements Metadatable{
|
||||
$this->id = Entity::$entityCount++;
|
||||
$this->justCreated = true;
|
||||
$this->namedtag = $nbt;
|
||||
|
||||
$this->chunk = $chunk;
|
||||
$this->setLevel($chunk->getProvider()->getLevel());
|
||||
$this->server = $chunk->getProvider()->getLevel()->getServer();
|
||||
|
Loading…
x
Reference in New Issue
Block a user