Merge branch 'stable' into next-minor

This commit is contained in:
Dylan K. Taylor
2021-12-15 03:12:41 +00:00
2 changed files with 13 additions and 7 deletions

View File

@@ -696,7 +696,13 @@ class Server{
}
public function removeOp(string $name) : void{
$this->operators->remove(strtolower($name));
$lowercaseName = strtolower($name);
foreach($this->operators->getAll() as $operatorName => $_){
$operatorName = (string) $operatorName;
if($lowercaseName === strtolower($operatorName)){
$this->operators->remove($operatorName);
}
}
if(($player = $this->getPlayerExact($name)) !== null){
$player->unsetBasePermission(DefaultPermissions::ROOT_OPERATOR);