sakurawald / fuji

A mod that ports EssentialsX / CMI from bukkit to fabric.
GNU General Public License v3.0
30 stars 3 forks source link

Enhance the compatibility with other chat-related mods. #66

Open fucksophie opened 2 weeks ago

fucksophie commented 2 weeks ago

Setting my prefix to <red>Some colors for you in luckperms, and having %fuji:player_prefix%%player:displayname_visual%%fuji:player_suffix%: %message% as my format, I get no colors from the prefix. Colors also don't work in the format.

Modlist: image

Hover and other things also do not work. It works if I leave and join and the chat.history submodule is turned on.

fucksophie commented 2 weeks ago

This is a issue with DCIntegration.

If you enable

[compatibility]
  # Disables modifying sent chat messages in-game to show who was pinged. (Will not convert <@1234567890> to @User)
  # This may fix mods also modifying sent messages
  disableParsingMentionsIngame = true

this setting, it fixes itself.

sakurawald commented 2 weeks ago

Setting my prefix to <red>Some colors for you in luckperms, and having %fuji:player_prefix%%player:displayname_visual%%fuji:player_suffix%: %message% as my format, I get no colors from the prefix. Colors also don't work in the format.

Modlist: image

Hover and other things also do not work. It works if I leave and join and the chat.history submodule is turned on.

This messages sent by chat.history are not chat message. Acturally, they are buffered messages that only sent to the new-joined player.

sakurawald commented 2 weeks ago

This is a issue with DCIntegration.

If you enable

[compatibility]
  # Disables modifying sent chat messages in-game to show who was pinged. (Will not convert <@1234567890> to @User)
  # This may fix mods also modifying sent messages
  disableParsingMentionsIngame = true

this setting, it fixes itself.

This seems to be an issue on chat message processing event priority. Maybe fuji should process the chat message later, so that the time-sequence is expected.

sakurawald commented 2 weeks ago

In current stage, fuji listens on the vanilla method "handleDecoratedMessage()" with 1001 priority (the default priority + 1). Some other chat-related mods may listen on other methods. Since fabric platform doesn't provide a chat event like bukkit api, it's hard to decide the priority of processing chat-message.