this code not found : PHP: $p->setAllowFlight(true); The code was enable but player can't fly i need a fly code please Thx
As said above, please provide the full Code. PHP: // Make sure $Player is definied to the Player object$player->setAllowFlight(TRUE); Have you imported the Player object?
You do not need to use a class unless you are creating an object, using it for identifying arguments/parameters, etc. You do NOT necessarily need to use pocketmine\Player to do $player->function as long as you get the Player object from somewhere.
Correct. But, for example in this case: PHP: public function seFlying(Player $Player){ $player->setAllowFlight(TRUE);} He would need to import the class.
In that case, he also would have received an error from PocketMine. Given that he didn't share any error, we can assume for now that he doesn't need to use it.
Please, first read (; (no offense) He said that the Code was not found. That could mean that the class was not found.
Could mean != Does mean. Unless you can read minds, you don't know what he meant. Simply guessing that he needed to use the class because of something else(That you guessed existed) in the plugin that isn't really relevant to the method he is using isn't helpful. I pointed this out because it is a common misconception that a use statement is always necessary, when it in fact is not. @JUZEXMOD, can you provide some information that could help your issue be resolved? An error, some context?
LOL. I don´t want to read minds, I just try to get what he means. Instead of getting Off-Topic now, try to help.
You have a good point. I apologize. Preventing misleading information from being spread is helpful. Beyond that, nothing can be done but wait for OP to provide some information.