diff --git a/src/Server.php b/src/Server.php index 8aa06aaacf..37feb68abd 100644 --- a/src/Server.php +++ b/src/Server.php @@ -1124,7 +1124,6 @@ class Server{ //TODO: move console parts to a separate component $consoleSender = new ConsoleCommandSender($this, $this->language); - $consoleSender->recalculatePermissions(); $this->subscribeToBroadcastChannel(self::BROADCAST_CHANNEL_ADMINISTRATIVE, $consoleSender); $this->subscribeToBroadcastChannel(self::BROADCAST_CHANNEL_USERS, $consoleSender); diff --git a/src/permission/PermissibleInternal.php b/src/permission/PermissibleInternal.php index 4506142b30..c9484085ee 100644 --- a/src/permission/PermissibleInternal.php +++ b/src/permission/PermissibleInternal.php @@ -64,10 +64,8 @@ class PermissibleInternal implements Permissible{ public function __construct(array $basePermissions){ $this->permissionRecalculationCallbacks = new ObjectSet(); - //TODO: we can't setBasePermission here directly due to bad architecture that causes recalculatePermissions to explode - //so, this hack has to be done here to prevent permission recalculations until it's fixed... $this->rootPermissions = $basePermissions; - //TODO: permissions need to be recalculated here, or inherited permissions won't work + $this->recalculatePermissions(); } public function setBasePermission($name, bool $grant) : void{ diff --git a/src/player/Player.php b/src/player/Player.php index 2eccd1ceac..8e18a1119d 100644 --- a/src/player/Player.php +++ b/src/player/Player.php @@ -305,8 +305,6 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{ return; } - $this->perm->recalculatePermissions(); - $this->server->getLogger()->info($this->getServer()->getLanguage()->translateString("pocketmine.player.logIn", [ TextFormat::AQUA . $this->username . TextFormat::WHITE, $session->getIp(),