• 欢迎来到Minecraft插件百科!
  • 对百科编辑一脸懵逼?帮助:快速入门带您快速熟悉百科编辑!
  • 因近日遭受攻击,百科现已限制编辑,有意编辑请加入插件百科企鹅群:223812289

ChatControl Pro/WIKI/监听优先度

来自Minecraft插件百科
Qsefthuopq讨论 | 贡献2019年1月29日 (二) 14:52的版本
跳转至: 导航搜索

子页面

常见疑问

权限

指令

频道

JSON

分组

格式

Discord

获取帮助

变量

处理器

JavaScript变量

多世界聊天格式

自定义指令缩写

自定义服务器名

监听优先度

聊天忽略

本地化

大多数插件都会监听事件. 插件在其他插件取消事件后再次取消事件.所以优先度很重要.

按顺序排列共有六种优先度

  1. LOWEST
  2. LOW
  3. NORMAL
  4. HIGH
  5. HIGHEST
  6. MONITOR

比如处理 BLOCK_PLACE 事件. lowest最低优先度监听器等待传唤是否取消事件. 然后low低优先度监听器会检查是否覆盖最低优先度的事件. 最后,它会发送到监视器,此时不改会事件的结果.
监视器用来查看事件的结果, 不会改变事件. 如果你安装了3个插件; 一个是基础的区域保护插件,一个是使用了告示牌的插件,最后一个是登录插件.保护插件监听Priority.LOWEST. 这款插件会发送 你无法在收保护的区域内放置方块' 的消息并取消放置方块的事件.
告示牌插件监听 Priority.NORMAL.发送 你无法在这里放置告示牌 并取消放置事件.
登录插件监听Priority.MONITOR. 登录插件会监听允许的事件并记录下来.

资源:

Event API 参考

http://bukkit.gamepedia.com/Event_API_Reference#Event_Priorities


与其他插件的兼容问题及如何修复

关于ChatControl常见的疑问就是修改聊天处理顺序. 你可以在配置内手动修改优先度.

你可以更改两种优先度. 位于settings.yml的Listener_Priority部分

  1. Listener_Priority.Formatter (用于聊天格式和频道.)
  2. Listener_Priority.Checker (用于防刷屏、防大写、规则等.)
  3. Listener_Priority.Signs (用于告示牌规则.)


Towny / Factions / Plots Squared

对于大多数服务器, you will need to experiment with the values to find a suitable combination that works for you. One user has reported following configuration working well with FactionsChat:

Listener_Priority:
  Formatter: LOWEST

BanManager / Litebans

If players can speak even when muted, it means that ChatControl listens to the chat event before the plugin that mutes your players, and thus allow them to speak anyway.

Users have reported that changing the Formatter priority to HIGH have fixed the issue.

You may experiment with different values (LOWEST, LOW, NORMAL, HIGH, HIGHEST and also MONITOR) to find a combination that works with your other plugins.

Denizen

Use the following settings to allow the Citizens2-Addon Denizen to catch chat-triggers for its scripts.

Listener_Priority:
  Formatter: HIGH