Replace disallowed operators in src/command/

This commit is contained in:
Dylan K. Taylor
2022-01-20 16:49:58 +00:00
parent 22bc3bc3f9
commit 2f32bd877a
9 changed files with 19 additions and 19 deletions

View File

@@ -183,11 +183,11 @@ class SimpleCommandMap implements CommandMap{
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])){
if(($command instanceof VanillaCommand || $isAlias) && isset($this->knownCommands[$label])){
return false;
}
if(isset($this->knownCommands[$label]) and $this->knownCommands[$label]->getLabel() === $label){
if(isset($this->knownCommands[$label]) && $this->knownCommands[$label]->getLabel() === $label){
return false;
}