Skip to content

Commit

Permalink
Fix poggit lint
Browse files Browse the repository at this point in the history
  • Loading branch information
harryitz authored Feb 6, 2022
1 parent f676368 commit 3fb305d
Showing 1 changed file with 19 additions and 23 deletions.
42 changes: 19 additions & 23 deletions src/YTBJero/NoAdvertisings/Main.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,30 +161,26 @@ public function onCommand(CommandSender $sender, Command $command, String $label
return false;
}
if (isset($args[0])) {
switch ($args[0]) {
case "add":
if(isset($args[1])){
return $this->addDomain($sender, $args[1]);
} else{
$sender->sendMessage("/noadvertisings add <domain>.");
return false;
}
break;
case "remove":
if(isset($args[1])){
return $this->removeDomain($sender, $args[1]);
}
else{
$sender->sendMessage("/noadvertisings remove <domain>.");
return false;
}
break;
case "list":
return $this->listDomain($sender);
break;
if($args[0] == "add"){
if(isset($args[1])){
return $this->addDomain($sender, $args[1]);
} else{
$sender->sendMessage("/noadvertisings add <domain>.");
return false;
}
}
if($args[0] == "remove"){
if(isset($args[1])){
return $this->removeDomain($sender, $args[1]);
} else{
$sender->sendMessage("/noadvertisings remove <domain>.");
return false;
}
}
}
else{
if($args[0] == "list"){
return $this->listDomain($sender);
}
} else{
$sender->sendMessage("/noadvertisings <add/remove/list>");
return false;
}
Expand Down

0 comments on commit 3fb305d

Please sign in to comment.