How do i get instance of player in a world ex. If player enters a command the code gets the player's world name if his in a world named spawn the command will work
PHP: public function onCommand(CommandSender $sender, Command $cmd, $label, array $args) { if($sender->getLevel()->getName() === "spawn") { if($cmd->getName() === "blablabla") { // code here } }}