Hello, I was wondering if it is possible to make a plugin that completely removes certain commands from even showing up to certain player groups.
I dont want the help command to disappear, I want a config where it will hide certain commands from certain groups
no. HelpModifier will hide command and you'll need to insert your command. And if you wanted to hide with some certain group, use it permissions.
That is really easily possible. small example: PHP: $command = $this->getServer()->getCommandMap()->getCommand("COMMAND NAME HERE")->setPermission("an_permission"); Only if the player has the permission "an_permission", command "COMMAND NAME HERE" will be shown to him
As it turns out, this was added to pmmp in the latest release: https://github.com/pmmp/PocketMine-MP/releases/tag/3.5.4
if use command block then use command /gamerule commandoutput false else if use plugin then unphar this plugin and edit src in $sender->sendMessage I think this post will good for you
public function Commands(PlayerCommandPreprocessEvent $event) { $cmd = explode(" ", strtolower($event->getMessage())); //ejemplo the command if($cmd[0] === "/gamemode"){ if(/7check Rank player) if is no true permisson $event->setCancelled(true); if is true permisson $event->setCancelled(false); } }