mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Fixed PermissibleBase->clearPermissions() not unsubscribing from permissions that aren't explicitly assigned
This came to light after observing cfb6856634
in a fresh light. I noticed that this fix should not have been necessary because clearPermissions() should have dealt with it. Unfortunately, permissions can be set without being set in PermissibleBase->permissions, so this misses things.
This commit is contained in:
@ -166,9 +166,7 @@ class PermissibleBase implements Permissible{
|
||||
|
||||
public function clearPermissions(){
|
||||
$pluginManager = Server::getInstance()->getPluginManager();
|
||||
foreach(array_keys($this->permissions) as $name){
|
||||
$pluginManager->unsubscribeFromPermission($name, $this->parent ?? $this);
|
||||
}
|
||||
$pluginManager->unsubscribeFromAllPermissions($this->parent ?? $this);
|
||||
|
||||
$pluginManager->unsubscribeFromDefaultPerms(false, $this->parent ?? $this);
|
||||
$pluginManager->unsubscribeFromDefaultPerms(true, $this->parent ?? $this);
|
||||
|
Reference in New Issue
Block a user