Skip to content

Support chatimage protocol #447

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 5, 2025
Merged

Conversation

Lumine1909
Copy link
Contributor

协议部分很简单 但是由于作者和Paper的一些奇奇怪怪的代码 需要开启这个新的配置项才能使用 并且可能与某些现有的聊天插件冲突

原因解析:

image

这个mod会在收到聊天并解析时处理发送的玩家 而原版的玩家名会被解析为MutableComponent(如果你曾经把鼠标放到过玩家名上会发现有悬浮字)

而Paper的Adventure处理的方法是直接把玩家的 String name变成 adventure component ,这会导致玩家名和聊天内容一起被解析为 String,mod无法处理消息

因此在Paper及其下游会出现

[21:43:46] [Render thread/WARN]: 识别失败:class java.lang.String cannot be cast to class net.minecraft.class_2561 (java.lang.String is in module java.base of loader 'bootstrap'; net.minecraft.class_2561 is in unnamed module of loader 'knot' @604ed9f0)

(我在考虑要不要给Paper或Chatimage发pr处理这个问题

@s-yh-china s-yh-china self-requested a review March 30, 2025 13:53
@Lumine1909 Lumine1909 requested a review from s-yh-china March 30, 2025 17:54
@s-yh-china s-yh-china linked an issue Apr 5, 2025 that may be closed by this pull request
@Lumine1909 Lumine1909 requested a review from s-yh-china April 5, 2025 15:26
@Lumine1909 Lumine1909 requested a review from s-yh-china April 5, 2025 15:34
@s-yh-china s-yh-china merged commit 941be1c into LeavesMC:master Apr 5, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ChatImage 支持
2 participants