I thought ive seen this before and i don't know if it was removed because i cant think of the code but wasn't there a way to make it where you had to hover over an NPC to make the name visible? Is there a way of doing this or maybe a way to make the name pop up when the player is a certain amount of blocks away
PHP: $entity->setNameTagVisible(true);//This leaves the name tag visible only when the "mouse" is aimed at the entity && PHP: $entity->setNameTagAlwaysVisible(true);//This always makes the nametag visible