Hello, i just need to know how to get a non decimal position ! I used : getX getY getZ And i got some crazy numbers like 124,00754325865 and so on.. But i just want to get 124 Without Decimal
PHP: $x = round($p->getX()); //If X is 124.0005 it'll return 124, if it's 124.58770000 it'll return 125//or:$x = ceil($p->getX()); //If X is 124.0005 it'll return 125, if it's 124.58770000 it'll return 125//or:$x = floor($p->getX()); //If X is 124.0005 it'll return 124, if it's 124.58770000 it'll return 124
Read api! PHP: // All functions below will return integer$player->getFloorX();$player->getFloorY();$player->getFloorZ();