When a player typed /join command, and his/her rank is S, he/she will join mine S after typed the command I hope that it will work with PurePerms... So, anybody can help me, please?
I think I understand what you want, I'll assist you with the PurePerms part but I'm not doing everything for you. PHP: $plugin = $this->getServer()->getPluginManager()->getPlugin("PurePerms");if(!$plugin instanceof \pocketmine\plugin\Plugin){ return;}if(!$player instanceof \pocketmine\IPlayer){ return;}//$player MUST be an instance of pocketmine\IPlayer//$group will be an instance of _64FF00\PurePerms\PGroup thats why we call PGroup::getName() so we can compare the groups name to the string "S"$group = $plugin->getUserDataMgr()->getGroup($player)->getName();if($group !== "S"){ return;}$level = $player->getServer()->getLevelByName("S");if(!$level instanceof pocketmine\level\Level){ return;}$player->teleport($level);
What about use a command as player? PHP: $group = $plugin->getUserDataMgr()->getGroup($player)->getName();if($group !== "S"){ return;}$command = ("as $player warp S")$this->getServer()->dispatchCommand($player, $command);{ return;}