Mojang has recently announced an exciting new feature for Minecraft: the player locator bar. This tool will allow players to see the location of others in the game world by displaying a dot for each player on the XP bar when XP is not being collected. While most players in multiplayer mode will be visible on this bar, there are several strategies to remain hidden.
How to Stay Hidden from the Player Locator Bar in Minecraft
Sneaking

One of the simplest methods to avoid detection by the player locator bar is to sneak. This involves crouching and moving quietly, which effectively lowers your character’s profile. Although this tactic can help you evade detection, it is limited since you cannot perform all in-game activities while sneaking.
Wearing a Carved Pumpkin

Another effective way to disguise yourself is by wearing a carved pumpkin. Players can create this item by using shears on a regular pumpkin block and then placing it on their head. Notably, this method has been historically used in Minecraft, not only as a way to conceal identity but also to prevent enderman aggressions when looked at directly.
However, keep in mind that wearing a carved pumpkin can obscure your vision, making it more challenging to play effectively.
Using the Invisibility Effect

Applying the invisibility effect can effectively render you invisible to the player locator bar. This effect is achieved by consuming a potion of invisibility, which consists of an awkward potion combined with a golden carrot and a spider eye. While this method can provide great cover, the duration of invisibility is limited, necessitating careful planning in multiplayer scenarios.
Wearing a Mob Head

A more effective option for hiding from the player locator bar is to wear a mob head. This tactic functions similarly to wearing a carved pumpkin but offers a superior advantage since it does not obstruct your first-person view with dark areas. Players can obtain various types of mob heads, making this a versatile choice for stealth in the game.
For further details and visuals on these tactics, check out this source.