PermissibleBase no longer circularly references its parent permissible

this was used for 2 things:
- to notify parent permissibles on recalculate permissions (not needed anymore thanks to callbacks)
- subscription to chat broadcast permissions (now handled separately, again using callbacks)

therefore, it's no longer needed for PermissibleBase to reference its parent, meaning that we can have one less circular dependency in our lives.
This commit is contained in:
Dylan K. Taylor
2020-12-01 18:46:39 +00:00
parent 341d8747b7
commit 1905c01c87
3 changed files with 12 additions and 22 deletions

View File

@ -278,7 +278,7 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
$this->uuid = $this->playerInfo->getUuid();
$this->xuid = $this->playerInfo instanceof XboxLivePlayerInfo ? $this->playerInfo->getXuid() : "";
$this->perm = new PermissibleBase($this, $this->server->isOp($this->username));
$this->perm = new PermissibleBase($this->server->isOp($this->username));
$this->chunksPerTick = (int) $this->server->getConfigGroup()->getProperty("chunk-sending.per-tick", 4);
$this->spawnThreshold = (int) (($this->server->getConfigGroup()->getProperty("chunk-sending.spawn-radius", 4) ** 2) * M_PI);
$this->chunkSelector = new ChunkSelector();