mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-15 16:05:28 +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;
|
$revert = true;
|
||||||
$this->nextChunkOrderRun = 0;
|
$this->nextChunkOrderRun = 0;
|
||||||
}else{
|
}else{
|
||||||
|
if($this->chunk instanceof FullChunk){
|
||||||
|
$this->chunk->removeEntity($this);
|
||||||
|
}
|
||||||
$this->chunk = $chunk;
|
$this->chunk = $chunk;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2340,12 +2343,18 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
|
|||||||
$this->loadQueue = [];
|
$this->loadQueue = [];
|
||||||
$this->hasSpawned = [];
|
$this->hasSpawned = [];
|
||||||
$this->spawnPosition = null;
|
$this->spawnPosition = null;
|
||||||
|
$this->perm->clearPermissions();
|
||||||
|
$this->perm = null;
|
||||||
unset($this->buffer);
|
unset($this->buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->server->removePlayer($this);
|
$this->server->removePlayer($this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function __debugInfo(){
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles player data saving
|
* Handles player data saving
|
||||||
*/
|
*/
|
||||||
|
@ -176,6 +176,7 @@ abstract class Entity extends Location implements Metadatable{
|
|||||||
$this->id = Entity::$entityCount++;
|
$this->id = Entity::$entityCount++;
|
||||||
$this->justCreated = true;
|
$this->justCreated = true;
|
||||||
$this->namedtag = $nbt;
|
$this->namedtag = $nbt;
|
||||||
|
|
||||||
$this->chunk = $chunk;
|
$this->chunk = $chunk;
|
||||||
$this->setLevel($chunk->getProvider()->getLevel());
|
$this->setLevel($chunk->getProvider()->getLevel());
|
||||||
$this->server = $chunk->getProvider()->getLevel()->getServer();
|
$this->server = $chunk->getProvider()->getLevel()->getServer();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user