Chat Heads

Chat Heads

51M Downloads

Compatibility with Spigot and EssentialX

RobertBrnn opened this issue · 6 comments

commented

On many servers the plugin EssentialX is used.
This allowes one to use nicknames and prefixes (among many other things).
However, this does not include the /tell shortcut...

Image

However, it does provide a /realname command. Which allows one to enter the nickname and receive the original name.
It would be amazing if an extra check could be added to run this command if the EssentialX plugin is detected and no head data can be found.

commented

So you do /realname <nickname> and it gives the profile name of the player, which can be used for /tell.
Did I get that right?

Chat Heads does have a feature where you can tell it who each player is, it's called name aliases.
In this example you would set it up like this:

Image

It's a manual process but it should work.

I might look into making it auto-add nicknames when it sees the "generalR is colonelR".

Currently though I'm completely overburdened by trying to port this mod to 1.21.9, as it's almost a full rewrite.
The largest part is done, but there's still so many small details to sort out - feeling pretty stressed with the release coming up soon.
So yeah, looking at this at a later time.

And for your suggestion of running /realname: That would not work.
Chat Heads does not know what part of a message is a player name, nickname or anything really, it's just a bunch of letters.
So instead of reading the message and going "aha, a message from generalR!", it instead goes "hm... there's all these players with all these names... let's go through the message and match every word with a name until we find something".

If it were to lookup every word in every message, this would just get you banned from the server... 😅

On that note:
To this day I still don't understand why plugin developers don't just add a /tell click command like vanilla does it.
You click on the name in the chat and get a /tell command with the correct profile name.
No need for /realname and it'd be way more compatible with Chat Heads too... but oh well.

commented

Thanks for the reply!
Yeah, you got it exactly. I'm indeed using the alias system. It's a bit bothersome when other players have long complex names XD.

If you'd be able to detect the response from that /realname command, that'd be awesome, but with such a rewrite not of high priority.
I agree fully, plugins shouldn't remove vanilla functionality, that destroys compatibility.
Say, would you perhaps know whether this would be caused by Spigot itself or the specific plugin EssentialX?
I'll send a request for /tell their way.

commented

Say, would you perhaps know whether this would be caused by Spigot itself or the specific plugin EssentialX?

I dont think Spigot by itself changes the chat at all, it's still considered "vanilla" afterall - though it seems everyone is at least using one plugin to get rid of chat reports (by turning player messages into server messages), which might also be removing the /tell click stuff, intentionally or not.

EssentialsX seems to work in the same way - it has to to support "customizable chat formatting".

My guess for not having /tell click events is either: They forgor, or, it's permissions related.

It's easy to set user permissions for commands like /realname.
Conditionally putting /tell click events on messages broadcast to different players might be hard - if plugins are even able to do that, I really don't know.

Looking through the issue tracker for "click" or "tell" for a bit, the closest thing I could find was "interactible names", though that didn't seem to be quite it (it was more of a feature request than a "vanilla parity" request).

So I guess it couldn't hurt if you wanna ask for it.

P.S.
Looks like the permission theory might be right:

Image
commented

Just released 0.14.0 and 1.1.0 with an "Auto-detect Name Aliases" feature that'll look for /realname response messages and auto-add them as aliases.

The feature is a little dumb as it really detects any message of the form "A is B", but it should be fine... famous last words?
Let me know if you run into issues with it!

commented
commented

I was just able to check it out, it looks great! I love that you add them to the 'manual' list of aliasses, so it is easy to correct if something goes wrong with it. Thank you very much!