Hello ich have an question How can i get the distance frm the "Hitter" to the "victim"? Example: I will hit Johnson i will get a message "You are {distance} Blocks from Johnson away" Sorry for the Bad english

If there isn't a function for this, I am pretty sure that you should use Pythagorean formula to calculate the distance between two coordinates, and round it.

Is there is a such function? Hm, I was unaware of it. I was saying about a way to calculate the distance between two players since I did not know such function existed. (If anyone says I suck because I didn't search, I'm going to be seriously annoyed.)

Use Vector3->distance(). Note that if you just use it for comparison, use distanceSquared() instead of distance(), and compare it with the square of the value you want to compare to. For example, to see if $vA is at least 4 blocks away from $vB, you can check `$vA->distanceSquared($vB) >= 16`, where 16 is 4 ** 2.

Although many people have no idea what Vector3 is for, it is actually an implementation of most vector operations, including addition, subtraction, scalar multiplication and division, dot and cross product, distance, length and other useful operations. Don't ask me what dot and cross products are. I referred to my school textbook chapter about vectors, and it only told me how to calculate them without saying what they are/how to use them; but they are very useful, I guarantee. Afaik something to do with matrixes.