用于 Identica 的插件,可在身份验证期间拦截聊天消息。
要求
- 所需插件:
- 已测试平台: Velocity
BungeeCord 支持: BungeeCord 目前未经测试(可能可用)。其 Adventure 类与 PacketEvents 分开加载,因此在生产环境中依赖它之前,请先在测试代理上进行验证。
工作原理
当玩家正在验证、注册或迁移时,发送给他们的聊天消息会被暂时扣留,除非是 Identica 自身的消息:
- Identica 的消息通过识别其加载的所有消息配置来确认:包括来自根注入器的核心消息,以及通过向 Identica 注册的配置提供程序提供的提供程序消息(例如凭证提供程序的登录/注册提示)。提供程序模块位于子注入器中,根注入器并未列出这些子注入器,因此需要同时检查这两个来源。
- 模板中的占位符被视为通配符,因此
You have {remaining} tries left.可以匹配You have 3 tries left.。故意忽略那些字面文本极少的模板。 - 玩家聊天消息(
DISGUISED_CHAT,以及 1.19+ 客户端的CHAT_MESSAGE)始终被扣留;它们绝不可能是 Identica 的消息。 - 如果无法加载任何消息模板(例如 Identica 仍在启动中),则不进行过滤,以避免意外隐藏 Identica 的提示信息。
- 匹配过程受到步骤预算限制;如果一个消息会导致模板过度回溯,则该消息将被视为“非 Identica 消息”。
Addon-plugin for Identica that blocks chat messages during authentication.
Requirements
- Required Plugins:
- Tested Platform: Velocity
BungeeCord Support: BungeeCord is currently untested (may work). Its Adventure classes are loaded separately from PacketEvents, so verify it on a test proxy before relying on it in production.
How it works
While a player is authenticating, registering or migrating, chat sent to them is withheld unless it is one of Identica's own messages:
- Identica's messages are recognised from every message configuration Identica has loaded: the core messages from the root injector, and the provider messages (such as the credential provider's login/register prompts) through the config providers registered with Identica. Provider modules live in child injectors that the root injector does not list, which is why both sources are needed.
- Placeholders in the templates are treated as gaps, so
You have {remaining} tries left.matchesYou have 3 tries left.. Templates with very little literal text are ignored on purpose. - Player chat (
DISGUISED_CHAT, andCHAT_MESSAGEfor 1.19+ clients) is always withheld; it can never be an Identica message. - If no message templates could be loaded (for example Identica is still starting), chat is not filtered, so that Identica's prompts are never hidden by mistake.
- Matching runs under a step budget; a message that would make a template backtrack excessively is treated as "not an Identica message".
下载 Identica-ChatBlocker
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Identica-ChatBlocker
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Identica-ChatBlocker
下载 Identica-ChatBlocker
下载 Identica-ChatBlocker
下载 Identica-ChatBlocker
更多信息:
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
插件
PacketEvents 是一款专为 Minecraft Java 版打造的协议库,旨在简化数据包的处理与传输。
插件
ExyliaPlugins 的库。
插件
通过对话框或铁砧界面帮助你的 Anthme
插件
自定义你的Minecraft头像!
插件
重新定义服务器上的生物运输方式。使用高度可定制的口袋道具,安全地捕获、存储和释放任何实体。
插件
为基于 Spigot/Paper/Folia 的服务器添加对 Vivecraft 的支持
评论 0
登录后参与评分
还没有评论,来抢沙发吧