Skip to content

Commit

Permalink
fixed undefined array key
Browse files Browse the repository at this point in the history
  • Loading branch information
Laith98Dev authored Apr 6, 2022
1 parent b73b028 commit c8f276d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/BedWars/command/DefaultCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class DefaultCommand extends \pocketmine\command\Command
'setpos' => ['desc' => "Set spawn & shop positions", 'usage' => "<game_id> <team_name> <1|2|3> - 3 = Player Spawn, 2 = Upgrade Shop, 1 = Item Shop"],
'addgenerator' => ['desc' => "Add generator", 'usage' => "<game_id> <iron|gold|diamond|emerald> "],
'setbed' => ['desc' => "Set team's bed", 'usage' => "<game_id> <team>"],
'addsafearea' => ['desc' => "Add area restricted for placing blocks", 'usage' => "<game_id>"],
'addsafearea' => ['desc' => "Add area restricted for placing blocks", 'usage' => "<game_id> 365:2,13,1:0"],
'load' => ['desc' => "Load arena after finishing setup", 'usage' => '<game_id>'],
'join' => ['desc' => "Join arena by id", 'usage' => '<game_id>'],
'random' => ['desc' => "Join random arena", 'usage' => ''],
Expand Down Expand Up @@ -281,7 +281,7 @@ public function execute(CommandSender $sender, string $commandLabel, array $args
return;
}

if(count($args) < 2){
if(count($args) < 3){
$sender->sendMessage($this->getSubUsage('addsafearea'));
return;
}
Expand Down Expand Up @@ -501,4 +501,4 @@ private function sendHelp(CommandSender $sender) {
$sender->sendMessage(TextFormat::RED . $command . TextFormat::GRAY . " - " . $info['desc']);
}
}
}
}

0 comments on commit c8f276d

Please sign in to comment.