mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-12 14:35:35 +00:00
parent
eeea4fa06a
commit
060426ff12
@ -174,6 +174,23 @@ class SimpleCommandMap implements CommandMap{
|
|||||||
return $registered;
|
return $registered;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Command $command
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function unregister(Command $command) : bool{
|
||||||
|
foreach($this->knownCommands as $lbl => $cmd){
|
||||||
|
if($cmd === $command){
|
||||||
|
unset($this->knownCommands[$lbl]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$command->unregister($this);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Command $command
|
* @param Command $command
|
||||||
* @param bool $isAlias
|
* @param bool $isAlias
|
||||||
|
Loading…
x
Reference in New Issue
Block a user