LOOHP / InteractiveChat

Add click and hover events to chat messages!
https://www.spigotmc.org/resources/75870/
GNU General Public License v3.0
159 stars 27 forks source link

ItemsAdder chat format (colors & emojis) doesn't get parsed properly in chat #163

Closed AGuyNamedJens closed 9 months ago

AGuyNamedJens commented 1 year ago

The characters for rainbow text does get parsed correctly using /interactivechat parse <r t>, but doesn't properly load in the chat... Why's that?

image - Chat result image - Parsed result

LOOHP commented 1 year ago

This command is used for testing IC placeholders only. Does it work properly in normal chat?

AGuyNamedJens commented 1 year ago

This command is used for testing IC placeholders only. Does it work properly in normal chat?

No, that's the point. It works on the discordSRV addon, as well as through console (commands/messages NOT sent by players). Only when players chat it doesn't parse them properly

AGuyNamedJens commented 1 year ago

@LOOHP any ideas?

LOOHP commented 1 year ago

Try every priority setting in Settings.EventPriorities.Chat one by one, see whether any of them makes a different.

AGuyNamedJens commented 1 year ago

Try every priority setting in Settings.EventPriorities.Chat one by one, see whether any of them makes a different.

Doesn't seem to have any effect, do i restart the server each time?

AGuyNamedJens commented 1 year ago

Disabling both of these: # This option is only effective on Minecraft 1.19.1+ ForceUnsignedChatPackets: false This option is only effective on Minecraft 1.19.1+ If this is true then ForceUnsignedChatPackets should also be true HideServerUnsignedStatus: false seems to fix it.. but then everyone gets these annoying prompts..

LOOHP commented 1 year ago

Seems like ItemsAdder is unable to read and modify unsigned player chat packets in that case. You might want to notify them about this. As their code is not open-sourced, it is hard to say for sure that this is the problem, but it could be. We can see how they respond first. In the mean time, you can keep ForceUnsignedChatPackets set to false.

AGuyNamedJens commented 1 year ago

Well for some reason when I set that option to false, no one seems to be able to read eachother's chats at all..

LOOHP commented 1 year ago

Have you tried restarting after changing that setting?

AGuyNamedJens commented 1 year ago

Have you tried restarting after changing that setting?

Yes but for some reason if i disable chat signing without changing the chats themselves, everyone who locally has it enabled can't see anyone's chats anymore

LOOHP commented 1 year ago

If ForceUnsignedChatPacketsis false then IC won't tinker with incoming chat packets. So whatever happens should be the standard behavior.

AGuyNamedJens commented 1 year ago

If ForceUnsignedChatPacketsis false then IC won't tinker with incoming chat packets. So whatever happens should be the standard behavior.

Yeah.. I guess it's Minecraft's behavior then.. Hopefully the bug on ItemsAdders side gets fixed quickly enough.. If i was allowed to share my JAR I could've shared the source but it's paid so, I can't:(

LOOHP commented 1 year ago

I do have ItemsAdder myself, but their code is extremely obfuscated so it's very painful to read and understand.

AGuyNamedJens commented 1 year ago

Ah bummer, I mean I get it due to the amount of illegal copies of other plugins going around the internet.. Idk if it's even possible, but wouldn't they allow to give you the source (or atleast the important part) to fix a bug?

LOOHP commented 1 year ago

We'll see how they respond first.

AGuyNamedJens commented 1 year ago

Well, I noticed the dev there returns to development in a week or 2.

I noticed that when i disabled InteractiveChat's color code handler, I can't use essentials's built-in one either? I wanted to disable it so I could use Essentials's color permissions, but I guess not.. Feels like Essentials doesn't support InteractiveChat either then?

LOOHP commented 1 year ago

By "disabling InteractiveChat's color handler", what did you actually do?

AGuyNamedJens commented 1 year ago

Chat: # Convert alternate color code character # Only one character is allowed, leave blank to disable this feature TranslateAltColorCode: ''

set this to '' because for some reason InteractiveChat overwrites essentials's permission where only players with "essentials.chat.color" can use it (or other types of color -> https://essentialsx.net/wiki/Color-Permissions.html)

LOOHP commented 1 year ago

You shouldn't have to change that if you just want to not use IC's color translate on player chat messages. You can just deny players the interactivechat.chatcolor.translate permission

AGuyNamedJens commented 1 year ago

I would like to use essentials's chat coloring, it doesn't seem like i can tell IC to give specific players specific colors

On Fri, Aug 25, 2023, 21:31 LOOHP @.***> wrote:

You shouldn't have to change that if you just want to not use IC's color translate on player chat messages. You can just deny players the interactivechat.chatcolor.translate permission

— Reply to this email directly, view it on GitHub https://github.com/LOOHP/InteractiveChat/issues/163#issuecomment-1693836975, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIIB3NXCPPLVWSMUPC6B5PTXXD4SXANCNFSM6AAAAAA3L3ZSNM . You are receiving this because you authored the thread.Message ID: @.***>

AGuyNamedJens commented 1 year ago

Seems like LoneDev fixed it since he's back from vacation.. No idea what the issue itself was though? Now the part of EssentialsX.. Any idea how to get those to parse based on permissions they use, rather than allow every color from InteractiveChat?

AGuyNamedJens commented 1 year ago

Also ontop of that, is there an option to prevent specific messages (for example the ItemsAdder's formats from being sent to Discord's webhook?

LOOHP commented 1 year ago

Seems like LoneDev fixed it since he's back from vacation.. No idea what the issue itself was though? Now the part of EssentialsX.. Any idea how to get those to parse based on permissions they use, rather than allow every color from InteractiveChat?

You can deny everybody's permission to interactivechat.chatcolor.translate, then IC will not touch chat colors. So other plugins such Essentials will have full control over that.

Also ontop of that, is there an option to prevent specific messages (for example the ItemsAdder's formats from being sent to Discord's webhook?

That I feel like something you would be set in DiscordSRV instead of InteractiveChat.

AGuyNamedJens commented 1 year ago

Seems like LoneDev fixed it since he's back from vacation.. No idea what the issue itself was though? Now the part of EssentialsX.. Any idea how to get those to parse based on permissions they use, rather than allow every color from InteractiveChat?

You can deny everybody's permission to interactivechat.chatcolor.translate, then IC will not touch chat colors. So other plugins such Essentials will have full control over that.

Wait, that's a thing? Why can't i find IC's permissions easily.. lol

Also ontop of that, is there an option to prevent specific messages (for example the ItemsAdder's formats from being sent to Discord's webhook?

That I feel like something you would be set in DiscordSRV instead of InteractiveChat. Oh right.. I thought InteractiveChat was managing that as well, considering it hides the [] templates. Will look into that :)

AGuyNamedJens commented 1 year ago

Yeah no i'm giving up on EssentialsX Chat, it's still not working.. Weird..

AGuyNamedJens commented 1 year ago

Also sometimes receiving this error: java.lang.RuntimeException: Unable to fetch assets from "api.loohpjames.com". This could be an internet issue or "api.loohpjames.com" is down. If the plugin functions correctly after this, this error can be ignored.