mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-22 12:39:43 +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,10 +245,9 @@ class ConsoleAPI{
|
||||||
}
|
}
|
||||||
$cmds = [];
|
$cmds = [];
|
||||||
foreach($this->help as $c => $h){
|
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){
|
if(isset($this->server->api->ban->cmdWhitelist[$c]) || !($issuer instanceof Player) || $this->server->api->ban->isOp($issuer)){
|
||||||
continue;
|
$cmds[$c] = $h;
|
||||||
}
|
}
|
||||||
$cmds[$c] = $h;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$max = ceil(count($cmds) / 5);
|
$max = ceil(count($cmds) / 5);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue