Hey! How can I check if a villager is in the vicinity of a player? For example from a radius of 5 blocks. So if a villager is in the vicinity of a player (for example 5 blocks away), the player get a message. Thanks!!
PHP: $dis = $player->distance($villager);if($dis <= 5){// do something} While $player is your player and $villager your villager. (You might also wanna try distanceSquared)