mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-24 13:39:44 +00:00
help will not call any events to detect can player execute the command or no
This commit is contained in:
parent
2039471e12
commit
b969b5d8f1
1 changed files with 2 additions and 3 deletions
|
|
@ -245,11 +245,10 @@ 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;
|
||||
}
|
||||
}
|
||||
|
||||
$max = ceil(count($cmds) / 5);
|
||||
$page = (int) (isset($params[0]) ? min($max, max(1, intval($params[0]))) : 1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue