PHP: public function onWorldChange(EntityLevelChangeEvent $event){ $player = $event->getEntity(); $target = $event->getTarget()->getName(); if($player->hasPermission("vip.features.use") && $target === "SmallPlot_NEW" OR $target === "BigPlot_NEW" ){ $player->setAllowFlight(true); $player->sendMessage("§aYou are able to fly in this world"); } else{ $player->setAllowFlight(false); } } Whenever someone obtains flight mode from entering the worlds SmallPlot_NEW or BigPlot_NEW they are allowed to fly. But whenever they move to another world WHILE flying $player->setAllowFlight(false); this doesnt remove fly untill they touch the ground. Meaning they can fly as much as they like as long as they dont touch the ground.. How do i completely take fly off them?
fun fact, you can do it for them like this PHP: public function onWorldChange(EntityLevelChangeEvent $event){$player = $event->getEntity();$target = $event->getTarget()->getName();if($player->hasPermission("vip.features.use") && $target === "SmallPlot_NEW" OR $target === "BigPlot_NEW" ){$player->setAllowFlight(true);$player->sendMessage("§aYou are able to fly in this world");}else{$player->setAllowFlight(false);}} if you cant help them you probably shouldnt bother mentioning it RE op you probably have to forcefully ground them by tping them to ground
I'm helping him When he put tags then there's more chance someone help him because it's easiest to read the code