/op command: Show usage info if no user specified

This commit is contained in:
JWhy 2014-01-26 13:21:51 +01:00
parent ec70dd476a
commit 1b227153a9

View File

@ -145,6 +145,10 @@ class BanAPI{
break;
case "op":
$user = strtolower($params[0]);
if($user == NULL){
$output .= "Usage: /op <player>\n";
break;
}
$player = $this->server->api->player->get($user);
if(!($player instanceof Player)){
$this->ops->set($user);