It is possible. PHP: $whitelistedCommands = ["gamemode"];foreach($this->getServer()->getCommandMap()->getCommands() as $command) { if(!in_array($command->getName(), $whitelistedCommands)) { $this->getServer()->getCommandMap()->unregister($command); }}