mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-06 11:57:10 +00:00
Fix derp
This commit is contained in:
parent
c3b8be3f60
commit
9390866a13
@ -37,9 +37,9 @@ interface CommandMap{
|
||||
* @param Command $command
|
||||
* @param string|null $label
|
||||
*
|
||||
* @return
|
||||
* @return bool
|
||||
*/
|
||||
public function register(string $fallbackPrefix, Command $command, string $label = null);
|
||||
public function register(string $fallbackPrefix, Command $command, string $label = null) : bool;
|
||||
|
||||
/**
|
||||
* @param CommandSender $sender
|
||||
|
@ -137,7 +137,14 @@ class SimpleCommandMap implements CommandMap{
|
||||
}
|
||||
}
|
||||
|
||||
public function register(string $fallbackPrefix, Command $command, string $label = null){
|
||||
/**
|
||||
* @param string $fallbackPrefix
|
||||
* @param Command $command
|
||||
* @param string|null $label
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function register(string $fallbackPrefix, Command $command, string $label = null) : bool{
|
||||
if($label === null){
|
||||
$label = $command->getName();
|
||||
}
|
||||
@ -163,7 +170,15 @@ class SimpleCommandMap implements CommandMap{
|
||||
return $registered;
|
||||
}
|
||||
|
||||
private function registerAlias(Command $command, $isAlias, $fallbackPrefix, $label){
|
||||
/**
|
||||
* @param Command $command
|
||||
* @param bool $isAlias
|
||||
* @param string $fallbackPrefix
|
||||
* @param string $label
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
private function registerAlias(Command $command, bool $isAlias, string $fallbackPrefix, string $label) : bool{
|
||||
$this->knownCommands[$fallbackPrefix . ":" . $label] = $command;
|
||||
if(($command instanceof VanillaCommand or $isAlias) and isset($this->knownCommands[$label])){
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user