mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-05 17:36:12 +00:00
some improvements to the horrendous mess that is the handling of joining and quitting, fixed some crashes, probably caused some other crashes
I can't fix this completely because it's just too much of a fucking mess. NEED to separate network stuff from Player.
This commit is contained in:
@ -188,12 +188,13 @@ class PermissibleBase implements Permissible{
|
||||
}
|
||||
|
||||
public function clearPermissions(){
|
||||
$pluginManager = Server::getInstance()->getPluginManager();
|
||||
foreach(array_keys($this->permissions) as $name){
|
||||
Server::getInstance()->getPluginManager()->unsubscribeFromPermission($name, $this->parent !== null ? $this->parent : $this);
|
||||
$pluginManager->unsubscribeFromPermission($name, $this->parent ?? $this);
|
||||
}
|
||||
|
||||
Server::getInstance()->getPluginManager()->unsubscribeFromDefaultPerms(false, $this->parent !== null ? $this->parent : $this);
|
||||
Server::getInstance()->getPluginManager()->unsubscribeFromDefaultPerms(true, $this->parent !== null ? $this->parent : $this);
|
||||
$pluginManager->unsubscribeFromDefaultPerms(false, $this->parent ?? $this);
|
||||
$pluginManager->unsubscribeFromDefaultPerms(true, $this->parent ?? $this);
|
||||
|
||||
$this->permissions = [];
|
||||
}
|
||||
|
Reference in New Issue
Block a user