A Player is an entity. ;-) So just check for nearest entities and break out of the loop once you found an entity that is a player
Yes, be sure to update the lore of the compass as well.. and just use (nearby entities) that should work.. just note the longer the lore, the harder it is to see for smaller screens. ; (
Totally agreed. Some servers have animated lores to display like a "commercial" of the game which tends to be over sized and most people can't see. My screen is fairly large and it cuts off (due to mojang's stupid lore system) like it all goes to the left which makes it so you can't see it..
use getNearbyEntities() in a for-loop where you increase the radius (maybe by 10 or 20 to make it faster) until the radius contains a Player-Entity in case there are 2 players, loop through all of them and check who has the shortest distance [getDistanceSquared()]