mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-22 12:39:43 +00:00
Minor fix to command.check
This commit is contained in:
parent
b42222c461
commit
ed9eadd1a0
1 changed files with 3 additions and 3 deletions
|
|
@ -53,7 +53,7 @@ class BanAPI{
|
||||||
$this->server->api->console->alias("pardon", "ban remove");
|
$this->server->api->console->alias("pardon", "ban remove");
|
||||||
$this->server->api->console->alias("pardon-ip", "banip remove");
|
$this->server->api->console->alias("pardon-ip", "banip remove");
|
||||||
$this->server->addHandler("console.command", array($this, "permissionsCheck"), 1);
|
$this->server->addHandler("console.command", array($this, "permissionsCheck"), 1);
|
||||||
$this->server->addHandler("console.check", array($this, "permissionsCheck"), 1);//Event handler when commands are issued. Used to check permissions of commands that go through the server.
|
$this->server->addHandler("command.check", array($this, "permissionsCheck"), 1);//Event handler when commands are issued. Used to check permissions of commands that go through the server.
|
||||||
$this->server->addHandler("player.block.break", array($this, "permissionsCheck"), 1);//Event handler for blocks
|
$this->server->addHandler("player.block.break", array($this, "permissionsCheck"), 1);//Event handler for blocks
|
||||||
$this->server->addHandler("player.block.place", array($this, "permissionsCheck"), 1);//Event handler for blocks
|
$this->server->addHandler("player.block.place", array($this, "permissionsCheck"), 1);//Event handler for blocks
|
||||||
$this->server->addHandler("player.flying", array($this, "permissionsCheck"), 1);//Flying Event
|
$this->server->addHandler("player.flying", array($this, "permissionsCheck"), 1);//Flying Event
|
||||||
|
|
@ -97,7 +97,7 @@ class BanAPI{
|
||||||
}
|
}
|
||||||
|
|
||||||
if($data["issuer"] instanceof Player){
|
if($data["issuer"] instanceof Player){
|
||||||
if($this->server->api->handle("console.check", $data) === true){
|
if($this->server->api->handle("command.check", $data) === true){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}elseif($data["issuer"] === "console" or $data["issuer"] === "rcon"){
|
}elseif($data["issuer"] === "console" or $data["issuer"] === "rcon"){
|
||||||
|
|
@ -105,7 +105,7 @@ class BanAPI{
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
case "console.check":
|
case "command.check":
|
||||||
if($this->isOp($data["issuer"]->iusername))
|
if($this->isOp($data["issuer"]->iusername))
|
||||||
return true;
|
return true;
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue