I need to get a Popup message everytime player holds an item but i dont know how to get Nearest player and meters can you help? Hotbar message: $pname / $distance (so i can use those strings in other things too)
$player1->distance($player2); where both $player1 and $player2 are `Player` objects. You can handle the conversion yourself
Would This Work I found it on the old forms posted by Falk its the http://en.wikipedia.org/wiki/Euclidean_distance formatted into php PHP: public function findDist(Position $a, Position $b) { return sqrt(pow($a->x - $b->x, 2) + pow($a->y - $b->y, 2) + pow($a->z - $b->z, 2));
hey i wrote a plugin using the said function above tell me if it works i cant really test since i have no one to test it with. github link:https://github.com/Jviguy/SendActionbarWithDistandName