mrbuilder1961 / ChatPatches

A Minecraft client-side mod that touches up Minecraft's mundane chat, with configurability in mind!
GNU Lesser General Public License v3.0
44 stars 16 forks source link

(At least) one player's username appears twice - 201.5.2 #99

Closed Slooshie1 closed 9 months ago

Slooshie1 commented 12 months ago

Description

Simple. One person's (potentially others' as well, haven't checked) username appears twice in the chat, in the same line, before their chat message. This does not happen to someone else's username who was on the server.

How to reproduce

  1. Install chat patches
  2. Join a server
  3. Have different people send messages in the chat
  4. Hopefully one of them will have two usernames so you can reproduce the issue

Expected result

For the person in question to only have one username before their chat message

Log file link

latest.log

Specs and Details

Required information:

Optional but suggested information:

Additional context

Screenshot 2023-07-13 170450

mrbuilder1961 commented 12 months ago

thanks, esp for the detailed bug report!

Slooshie1 commented 12 months ago

I can send a new chat log in a bit, but we do have Styled Chat on the server. I noticed that the people who do NOT have a custom display name have duplicate usernames while people with custom display names, such as to change our colors, do not have this problem.

Dragonruler6008 commented 12 months ago

I can also report I have this issue while running Essentials / Essentials chat on my personal server. Custom nicks do not have this issue while vanilla usernames are double. chatlog.json (I hope this is long enough for you)

mrbuilder1961 commented 11 months ago

(idk why it auto closed, i specifically said "try")

i doubt it will fix but i was looking over the code and some of the player name checks seemed inconsistent, so if you guys could try this version (file looks the same as v201.5.2) i am interested to see if this helps at all. bc i am on mobile the normal file link isn't letting me copy, so just go here, click on "jars", download it, unzip it, and add the normal looking file to your mods folder.

(warning: the version number and name is identical to the published one so maybe move the original one to another file or rename it)

Slooshie1 commented 11 months ago

tried the linked jar file, still the same. But now someone with a custom display name from Styled Chat has double usernames as well. It displays their vanilla username before their custom display name image_2023-07-17_184506492

Dragonruler6008 commented 11 months ago

I can report that with essentials / essentials chat the issue persists. No additional changes were noted between the regular mod and the linked above one. Vanilla users still have 2 names while those who are nicked only have the one.

mrbuilder1961 commented 11 months ago

this is so weird, i literally just fixed what i thought was this same issue over in #96. ill have to do a deep-dive when i get back from my vacation.

mrbuilder1961 commented 11 months ago

can anyone confirm that this issue is still occurring in this dev build:

{original link: https://github.com/mrbuilder1961/ChatPatches/suites/14534090371/artifacts/822264399 }

{updated: https://github.com/mrbuilder1961/ChatPatches/suites/14657391408/artifacts/831710501 }

Dragonruler6008 commented 11 months ago

Can confirm that this issue is resolved when using essentials / essentials chat. Both nicked users and users with vanilla usernames appear only once.

mrbuilder1961 commented 11 months ago

can anyone confirm that this issue is still occurring in this dev build:

{original link: https://github.com/mrbuilder1961/ChatPatches/suites/14534090371/artifacts/822264399 }

{updated: https://github.com/mrbuilder1961/ChatPatches/suites/14657391408/artifacts/831710501 }

@Slooshie1 ?

hexadecimal233 commented 11 months ago

The underlying issue hasn't been resolved i think. I just added the "<$>" setting changed check to prevent the mod do name formattings. During the testing, essential /nick no longer works if I change the name formatting other than <$>

mrbuilder1961 commented 11 months ago

could you provide images of what it is supposed to look like vs what it actually ends up looking like?

i dont know of any servers with name formattings that aren't super over the top, so i can't really test this myself.

hexadecimal233 commented 11 months ago

If you are nicked into abc using EssentialsX, and the format is set to [$] Expected: <abc> hello world Actual: [(Player Name)] hello world

Name formatting ignored nickname, and used the real name instead.

mrbuilder1961 commented 11 months ago

that's pretty weird, maybe it has to do with this line not checking if the string name and the cached name are the same. https://github.com/mrbuilder1961/ChatPatches/blob/572ff7575a9ba5e3dc24041d94163161aed060d4/src/main/java/obro1961/chatpatches/mixin/gui/ChatHudMixin.java#L171 (it only checks that player data is associated w the message and it was in vanilla format) also, is the nickname a scoreboard/team (partially vanilla) thing or is it entirely Essentials?