I cant find some function in pocketmine github code, for example, i cant find getX() function in Player class. And can i set the X,Y,Z of a player, like: $a = $player; $a->setX(100); but the real player doesnt be affect.Thank in advance
The Player class inherits from the Human class which inherits from the Creature class which inherits from the Living class which inherits from the Entity class which inherits from the Location class which inherits from the Position class which inherits from the Vector3 class (located in the Math submodule). The Vector3 class has the getX function: https://github.com/pmmp/Math/blob/d7fda7a3abb078f6c709f02ddbb79444efa8cbe2/src/Vector3.php#L61-L63 Inheritance is one of the (if not the) most important principle of OOP programming, see this for more information about how it works in PHP: https://www.php.net/manual/en/language.oop5.inheritance.php In order to properly move a player you should use $player->teleport() instead. Here's an example: PHP: $loc = $player->getLocation();$loc->x = 100;$player->teleport($loc);