Hello, recently i have used that code: PHP: $player->setFlying(false); $player->setAllowFlight(false); But when runs that, the player goes to the floor with the setFlying method, but don't disable the flight mode by setAllowFlight, i have set false on that, but i can fly every time when i do that.. And i don't know why, i have tryed changing the gamemode of player but nothing is working, i set setAllowFLight(false) and i still with flight mode..
You need to put more detail or show your entire code because none of us know if u used either PlayerInteractEvent or a command...
Given the details, that code is exactly what I'm currently using and it seems to work flawlessly except my code calls setAllowFlight() before setFlying() but that shouldn't be the problem.