mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Improved some events
This commit is contained in:
parent
c83d4d955f
commit
7d3992bcc2
3 changed files with 31 additions and 7 deletions
|
|
@ -76,7 +76,7 @@ class BanAPI{
|
|||
switch($event){
|
||||
case "player.flying"://OPs can fly around the server.
|
||||
if($this->isOp($data->iusername)){
|
||||
return true;
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case "player.block.break":
|
||||
|
|
@ -92,15 +92,15 @@ class BanAPI{
|
|||
break;
|
||||
case "console.command"://Checks if a command is allowed with the current user permissions.
|
||||
if(isset($this->cmdWhitelist[$data["cmd"]])){
|
||||
return true;
|
||||
return;
|
||||
}
|
||||
|
||||
if($data["issuer"] instanceof Player){
|
||||
if($this->server->api->handle("console.check", $data) === true or $this->isOp($data["issuer"]->iusername)){
|
||||
return true;
|
||||
return;
|
||||
}
|
||||
}elseif($data["issuer"] === "console" or $data["issuer"] === "rcon"){
|
||||
return true;
|
||||
return;
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue