mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-07 18:41:47 +00:00
Revert "Better Command Permissions Check"
This reverts commit b42222c4619f57de2a2ecfd778dc7a14c08fa04e.
This commit is contained in:
parent
a93b2cf954
commit
fd5d981aa5
@ -52,8 +52,7 @@ class BanAPI{
|
|||||||
$this->server->api->console->alias("banlist", "ban list");
|
$this->server->api->console->alias("banlist", "ban list");
|
||||||
$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);//Event handler when commands are issued. Used to check permissions of commands that go through the server.
|
||||||
$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("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 +96,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("console.check", $data) === true or $this->isOp($data["issuer"]->iusername)){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}elseif($data["issuer"] === "console" or $data["issuer"] === "rcon"){
|
}elseif($data["issuer"] === "console" or $data["issuer"] === "rcon"){
|
||||||
@ -105,12 +104,6 @@ class BanAPI{
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
case "console.check":
|
|
||||||
if($this->isOp($data["issuer"]->iusername))
|
|
||||||
return true;
|
|
||||||
else
|
|
||||||
return false;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user