felixstaude / Emotes

This is a minecraft spigot plugin to use twitch emotes in minecraft chat. Use the config.yml to replace any emote name to any unused PUA character and add it in your texturepack
1 stars 1 forks source link

Compatibility with other message plugins #3

Closed M1B4ND closed 3 months ago

M1B4ND commented 3 months ago

It seems that Emotes is not compatible with other message plugins. Like DiscordSRV in my case.

Hypothesis: it seems that Emotes cancels players' messages in order to resend them. Wouldn't it be better to modify player messages? So that other message plugins, such as DiscordSRV, can process them too. I've been told it could be event.setMessage().

What do you think? Do you have the same problem yourself?

felixstaude commented 3 months ago

Yes it seems like its an issue of the onPlayerChatEvent, cause it gets cancelled and everyone gets a message with the player.sendMessage() thing. I'll fix that later that day

M1B4ND commented 3 months ago

4 This doesn't seem to be the right solution. Other plugins like DiscordSRV have access to messages now. But player messages are sent twice.

The message is displayed twice in-game, and only once on Discord Screenshot of the in-game : image Screenshot on Discord : image

M1B4ND commented 3 months ago

The problem is solved. I deleted the for loop on line 33. https://github.com/felixstaude/Emotes/pull/4/commits/4ab9b9a5b952d40d02ad09168b3c0767588a38a1

These are new screenshots. They show that everything is working properly on my side. in-game : image on Discord : image

M1B4ND commented 3 months ago

I don't know if you want to upgrade to Emotes-v1.1.1 or not. So I'll let you do it.

felixstaude commented 3 months ago

Yes, i will update as soon as im home from work. This looks right. Thank you!