eclipseisoffline / customname

This mod adds a /name command to Minecraft, which players can use to set a prefix, suffix, or nickname.
GNU Lesser General Public License v3.0
2 stars 1 forks source link

[BUG] The name tag overhead is not a nickname. #5

Open nea-c opened 4 days ago

nea-c commented 4 days ago

Describe the bug Changing the nickname does not change the overhead nameplate to the nickname.

To Reproduce Steps to reproduce the behavior:

  1. join the server (2 or more people)
  2. one person changes his/her nickname
  3. the person who did not change his/her nickname sees the person who did.

Expected behavior The name plate above the head will also be changed to the assigned nickname.

Screenshots 2024-11-25_09 45 47

Minecraft setup (please complete the following information):

eclipseisoffline commented 4 days ago

Hi there, I have explained before in a different issue report why this occurs (here):

The reason custom names don't display above players is due to limitations on the Minecraft client. Trying to change the name shown above the player will cause issues with commands and other stuff, as can be seen in #2. I explained why this occurs there:

If you're interested in a technical explanation, [nicknames above player heads] are implemented by sending the nicknames of players as their literal player names to the client. This causes the client to show the nicknames above the player heads as if they were their literal names, but also causes the client to list these nicknames in the player suggestions in commands, since the client thinks these are the real player names [and causes other issues].

A workaround to this would be to hide player names, and instead send an armour stand sitting on the player to the client, with the custom name. However this is a bit finicky, hard to get right, and can cause issues with other mods and such, so I prefer not to do that.

I'll leave this bug report open though - as I mentioned above, the armour stand method is a bit finicky to work with, although I am interested in possibly adding a feature like that (likely off by default though). Maybe when updating the mod to 1.21.4 I'll get to it, although I am quite busy with other things too so I'll see if I have the time for it.

nea-c commented 3 days ago

Sorry, I forgot. I think I heard somewhere that you need to use an armor stand to operate it.

However, I was wondering how to recreate the name tag when sneaking.

eclipseisoffline commented 3 days ago

No worries, and yeah - that's one of the issues with it. The way on implementing sneaking would be to hide the name entirely, even if the player is visible for other players, which isn't preferable.