help will not call any events to detect can player execute the command or no

This commit is contained in:
GameHerobrine 2023-10-08 13:14:53 +03:00
parent 2039471e12
commit b969b5d8f1

View file

@ -245,10 +245,9 @@ class ConsoleAPI{
}
$cmds = [];
foreach($this->help as $c => $h){
if($this->server->api->dhandle("console.command." . $c, ["cmd" => $c, "parameters" => [], "issuer" => $issuer, "alias" => false]) === false or $this->server->api->dhandle("console.command", ["cmd" => $c, "parameters" => [], "issuer" => $issuer, "alias" => false]) === false){
continue;
if(isset($this->server->api->ban->cmdWhitelist[$c]) || !($issuer instanceof Player) || $this->server->api->ban->isOp($issuer)){
$cmds[$c] = $h;
}
$cmds[$c] = $h;
}
$max = ceil(count($cmds) / 5);