mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 16:51:42 +00:00
Fixed players losing all permissions when being de-opped after joining as op
This commit is contained in:
parent
687ad28fa6
commit
bc2fafca27
@ -279,7 +279,11 @@ 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->server->isOp($this->username) ? [DefaultPermissions::ROOT_OPERATOR => true] : [DefaultPermissions::ROOT_USER => true]);
|
||||
$rootPermissions = [DefaultPermissions::ROOT_USER => true];
|
||||
if($this->server->isOp($this->username)){
|
||||
$rootPermissions[DefaultPermissions::ROOT_OPERATOR] = true;
|
||||
}
|
||||
$this->perm = new PermissibleBase($rootPermissions);
|
||||
$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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user