PHP: if($player->getWorld()->getFolderName() == "island-" . $player->getName){$player->sendMessage("worked.");} else {$oyuncu->sendMessage("not worked");} I maked this code but it always gives a not worked message. How can i fix this? I tried getDisplayName, getName.
PHP: if(!$oyuncu->getWorld()->getDisplayName() == "ada-*") PHP: if(!$oyuncu->getWorld()->getDisplayName() == "ada-".$oyuncu->getName()) When I try like this it doesn't work but PHP: if(!$oyuncu->getWorld()->getDisplayName() == "ada-PlayerName") It works when I try like this.
Try combining the two Strings together and then call it in getDisplayName(), try to see the output of the String using var_dump to be sure (idk if that function still exists) because the problem here seems to be that the $player->getName() or $oyuncu->getName() is either giving the wrong information for some reason or the nickname of the player you are using does not match with the folder name you want to check. So try to check if things are matching properly and then test it again.