70CentsApple / ChatTools

Chat Tools 一个 Minecraft Fabric 辅助模组 | A Fabric client-side Minecraft Mod
GNU General Public License v3.0
13 stars 4 forks source link

Chat Filter Forwarding #29

Open AlphaLeoli opened 2 months ago

AlphaLeoli commented 2 months ago

Motivation

In servers, there is sometimes spam in chat that is just something about the current gamemode. It really doesn't need to be spammed in chat, and can be useful somewhere else like on the action bar or bossbar.

Description

Add settings to each chat filter that you define, which would be the following: chat, bossbar, action bar, and toast. Each one of those when enabled would allow you to input what you want it to say! For example, if your chat filters is gave (?<Amount>\d*) (?<Item>[a-z_]{3,21}) to (?<Player>[a-zA-Z0-9_§]{3,16}), and you have the chat, bossbar, and toast options off but the action bar on, then you can put the string for action bar to You gave {Player} {Amount} {Item}s! and it won't show the output in chat (since you have it disabled) and instead will forward to your action bar where you can put what you want.

You would be able to do many things with this, like showing important messages in toasts or minigame things in the bossbar. I would probably use it to put every chat message that has my name in it on the actionbar (as well as the other things obviously).

Other information

No response