Is there a way to check if a player is moving? (Jumping or walking/sprinting and not change in yaw or pitch) Example: PHP: public function onRun(int $currentTick) { if ($this->player->x = $this->player->lastX) { // Do stuff }}
PHP: $player->getMotion()->x ^^^ would return the player's current x. How can I check for the player's last x coordinate? Would PHP: $player->getLastX work?