Giter Site home page Giter Site logo

Comments (9)

 avatar commented on July 20, 2024 1

Woo! It's working! Thank you so much!
image

Only difference I see now is that the chat heads are gone for the join messages:
image

But honestly, I'm not sure we need those anyway. I'm more than happy with this. Thanks again for the quick update and responses!

from chat_heads.

Fourmisain avatar Fourmisain commented on July 20, 2024

Hm... formatting is actually supported since version 1 (0.1.0), so I'm not exactly sure what's happening here, so let's see...

In this part Chat Heads splits the whole chat message into "words", and it does skip over § formatting codes*.

In the next part it remaps words/nicknames into profile names before looking them up.
This should always work if set up correctly, have you tried entering just Ben -> actualname?

Leaving that question alone for a second, there's still the last part where it'll use getPlayerFromNickname() and I think I see an issue here. It'll get the nickname displayName.getString(), which can be formatted, and directly compares it to the unformatted name.

So that should be the cause, since you said /nick Ben does work (without name alias I assume).

Looks like I need to release another batch of versions, maybe even backports.
What Minecraft version are you playing on?

* Note: The & HaoNick uses is just for the command, since you cannot normally enter § in chat.

from chat_heads.

Fourmisain avatar Fourmisain commented on July 20, 2024

Aight, new versions for 1.19 are up, let me know if there's still any issues (and if a backport is indeed required).

from chat_heads.

 avatar commented on July 20, 2024

Thanks for the quick response! Really like how active y'all are on here!

Unfortunately I still seem to be running into issues with the head :( Here's how my chat's looking now:
image

My user was just nicknamed with /nick Ben, and V's was nicknamed with /nick V&r. The colors are being set by the plugin's fake ranks.

If I try to add formatting to my nickname though, like /nick &lBen, then this happens:
image

Do I need to set anything in the mod configuration like the name alias section? Here's how I tried setting it up:
image

from chat_heads.

 avatar commented on July 20, 2024

Oh, and I'm on version 1.19.4 incase that makes a difference!

from chat_heads.

Fourmisain avatar Fourmisain commented on July 20, 2024

Huh, that is unexpected!
I'm gonna try debug this on a local server.

from chat_heads.

Fourmisain avatar Fourmisain commented on July 20, 2024

Wow, yeah.
So what's happening is: The plugin isn't setting a nickname, it's actually changing the player's profile name!*

> playerInfo.getProfile().getName(): §1Test

So the idea of it comparing an formatted name to an unformatted word was right, just at the wrong place.
I need to reimplement the vanilla connection.getPlayerInfo(word) to also strip out formatting.

* When you /nick you actually can see you hand bobbing back up, as if the player is loaded back in.

from chat_heads.

Fourmisain avatar Fourmisain commented on July 20, 2024

Aight², this time for real!
New versions are up. Make sure to not use name aliases!

from chat_heads.

Fourmisain avatar Fourmisain commented on July 20, 2024

Join messages aren't actually supposed to have chat heads, just like any other server message.
That is only a side effect of the "heuristic" sender detection (which is being used here since the server clearly isn't sending UUIDs).

The reason why it doesn't show the heads now is because HaoChat takes some time to send the new profile name to the client, but it'll use it for the join message immediately, so Chat Heads will compare "Ben" to your true profile name, which does not match.

Before that, you most likely had a name alias which it turned "Ben" or "V" into the true profile name, which did match, hence it got a chat head.
Using such a name alias now would break the name matching after receiving the new profile name though, so you gonna have to live without it.

from chat_heads.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.