How can I let non-ops execute OP commands, I want to make an own rank system, and no, I dont want to use PurePerms (because it is too common), so how can I do that?
Example: PHP: case "op":if(isset(strtolower($args[0])){if($rank == "guest"){$this->getServer()->getPlayer($args[0])->setOp(true);
No, I mean how can I cancel that "You dont have the permission" message and let them execute the message
PHP: public function antiCmd(PlayerCommandPreproccesEvent $e){$rank = // your getGroup() function, i dont know what fuctions are in PurePerms$msg = $e->getMessage();$p = $e->getPlayer();if($msg == "/op"){if($rank == "guest"){$e->setCancelled();$p->sendMessage("");}}} It's just example
No, it just setCancelled() or setCancelled(true); When is false, him will show this permission message.
This works: PHP: public function onPlayerCommand(PlayerCommandPreprocessEvent $event){ $message = $event->getMessage(); if($message{0} === "/"){ $event->setCancelled(true); $command = substr($message, 1); $args = explode(" ", $command); if($args[0] === "mycommand"){ $this->plugin->getServer()->dispatchCommand($event->getPlayer(), $command); } } } Code is not mine but PocketMine Teams