small command fix for default players

This commit is contained in:
GameHerobrine 2022-05-13 00:05:50 +03:00
parent 28303a95fb
commit edc2ec0e53

View file

@ -245,7 +245,11 @@ class ConsoleAPI{
if(($d1 = $this->server->api->dhandle("console.command.".$cmd, array("cmd" => $cmd, "parameters" => $params, "issuer" => $issuer, "alias" => $alias))) === false
or ($d2 = $this->server->api->dhandle("console.command", array("cmd" => $cmd, "parameters" => $params, "issuer" => $issuer, "alias" => $alias))) === false){
$output = "You don't have permissions to use this command.\n";
if(in_array(strtolower($cmd), array_keys($this->cmds))){
$output = "You don't have permissions to use this command.\n";
}else{
$output = "Command doesn't exist! Use /help\n";
}
}elseif($d1 !== true and (!isset($d2) or $d2 !== true)){
if(isset($this->cmds[$cmd]) and is_callable($this->cmds[$cmd])){
$output = @call_user_func($this->cmds[$cmd], $cmd, $params, $issuer, $alias);