Skip to content
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

keepMessage #58

Closed
wants to merge 1 commit into from
Closed

keepMessage #58

wants to merge 1 commit into from

Conversation

Crystal0404
Copy link
Contributor

#57

  • 不依赖fabric-api
  • 依赖minecraft >= 1.20.2

玩家使用/server切换服务器时会进入配置阶段, 这个阶段会清除聊天记录

使用@WrapWithCondition将清除聊天记录代码包裹上if, 问题就解决了

玩家disconnect的时候, 记录会正常清除

其他

于1.20.4测试正常

restriction = @Restriction(require = @Condition(value = minecraft, versionPredicates = ">=1.20.4")),
category = Config.Category.PORTING
)
public static final TweakerMoreConfigBoolean KEEP_MESSAGE = newConfigBoolean("keepMessage", false);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

建议使用名字 keepMessageHistoryOnReconfiguration

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

除此之外,该选项应为 mc_tweak

@Mixin(MinecraftClient.class)
public abstract class MinecraftClientMixin
{
@WrapWithCondition(
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

阻止整个 inGameHudclear 可能会导致其他的副作用

.: keepMessage
comment: |-
Keep your chat messages
With this option, When you use "/server", the client retains your chat message
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

请描述清楚功能用途。在原版语义下,/server 指令是不存在的指令

Fallen-Breath added a commit that referenced this pull request Mar 22, 2024
@Fallen-Breath
Copy link
Owner

已于 c5713a3 实现

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.

2 participants