mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-17 04:06:54 +00:00
SimpleCommandMap: Enforce command permissions by default (#4681)
this resolves many security issues, as well as removing a ton of boilerplate code. It may be desirable to react to permission denied; this can be done by overriding Command->testPermission(), or by using setPermissionMessage() to set a custom permission denied message.
This commit is contained in:
@@ -43,10 +43,6 @@ final class PluginCommand extends Command implements PluginOwned{
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!$this->testPermission($sender)){
|
||||
return false;
|
||||
}
|
||||
|
||||
$success = $this->executor->onCommand($sender, $this, $commandLabel, $args);
|
||||
|
||||
if(!$success && $this->usageMessage !== ""){
|
||||
|
Reference in New Issue
Block a user