持续开发已移至新的高级资源 此处。
Herochat 5
Herochat 5 是对之前版本的 Herochat 的重写。对于不熟悉 Herochat 的用户,该插件为 SMP 聊天提供了一个高度可配置的频道系统。Herochat 的主要目的是使大型服务器上的玩家聊天既易于管理又清晰可读。每个聊天频道都为频道成员提供了一个讨论空间,而无需将消息一次性广播给服务器上的所有人。玩家可以同时加入多个频道,但一次只能有一个处于活动或聚焦状态的频道用于发言。
从 Herochat 4.x 升级?请阅读以下内容:
如果您是从 Herochat 4.x 或更早版本升级,您需要丢弃所有配置文件。很抱歉,这是必须的。现在有了在游戏中修改频道的命令,希望设置您的频道不会那么痛苦。
主要功能
- 可配置的聊天频道
- 密码保护的频道
- 基于权限的保护,几乎涵盖所有想象得到的操作
- 频道管理(踢出、封禁、静音等)
- 快速消息(在不更改活动频道的情况下向另一个频道发送消息)
- 私聊(/msg 或 /tell),包括持久的私人对话
- 与其他插件的大多数聊天标签简单集成(例如 Towny、Factions)
- 基于正则表达式的消息审查
依赖项
此插件需要 Vault
权限
| 权限 |
用途 |
|
| herochat.create |
允许创建频道 |
|
| herochat.save |
允许强制保存玩家/频道数据 |
|
| herochat.reload |
允许强制重载玩家/频道数据 |
|
| herochat.mod |
允许使用 /ch mod |
|
| herochat.mute |
允许使用 /ch mute |
|
| herochat.pm |
允许使用 /msg |
|
| herochat.emote |
允许使用传统表情动作 |
|
| herochat.emote.<channel> |
允许在频道中使用表情动作 |
|
| herochat.join.<channel> |
允许加入频道 |
|
| herochat.leave.<channel> |
允许离开频道 |
|
| herochat.speak.<channel> |
允许在频道中发言 |
|
| herochat.kick.<channel> |
允许将人踢出频道 |
|
| herochat.ban.<channel> |
允许封禁某人进入频道 |
|
| herochat.mute.<channel> |
允许在频道中禁言 |
|
| herochat.remove.<channel> |
允许删除频道 |
|
| herochat.color.<channel> |
允许在聊天中使用 &c 样式颜色 |
|
| herochat.info.<channel> |
允许对频道使用 /ch info 命令 |
|
| herochat.autojoin.<channel> |
首次登录时强制自动加入频道 |
|
| herochat.focus.<channel> |
赋予玩家聚焦频道的能力 |
|
| herochat.force.join.<channel> |
每次登录时强制玩家加入频道 |
|
| herochat.force.leave.<channel> |
每次登录时强制玩家离开频道 |
|
| herochat.modify.nick.<channel> |
允许更改频道的昵称 |
|
| herochat.modify.color.<channel> |
允许更改频道的颜色 |
|
| herochat.modify.distance.<channel> |
允许更改频道的距离范围 |
|
| herochat.modify.format.<channel> |
允许更改频道的格式 |
|
| herochat.modify.shortcut.<chanenel> |
允许更改频道是否支持快捷消息 |
|
| herochat.modify.password.<channel> |
允许更改频道的密码 |
|
| herochat.modify.verbose.<channel> |
允许更改频道是否显示加入/离开消息 |
|
| herochat.admin.stealth |
允许隐藏自身以避免被“无人听见”检测发现 |
|
| herochat.admin.unignore |
允许用户不被忽略 |
|
| herochat.color.colortype.channel |
允许使用加粗/斜体等(仅在最新开发版中可用) |
部分权限会自动授予频道的管理员(这些可以在主配置文件中修改)。大多数服务器会希望向所有人授予 herochat.join.*、herochat.speak.* 和 herochat.leave.* 权限,然后使用相应的否定权限来撤销受限频道的权限(例如在 bPermissions 中使用 ^herochat.join.staff)。
配置
频道使用 /ch create <name> [<nick>] 创建,该命令接受频道名称和昵称(可选)作为参数。完成此操作后,会在 plugins/Herochat/channels 中为该频道创建一个配置文件。然后通过手动编辑或使用游戏内的 "/ch set" 命令来修改频道的设置。输入 /ch set ? 以获取有关此命令的更多信息。下面列出并解释了可用的配置设置。
如果你通过手动方式(使用文件编辑器)进行修改,可以使用 /ch reload 来加载更改。这将覆盖在此期间通过游戏内命令所做的任何更改。另一方面,如果你想强制保存通过游戏内命令所做的更改,可以使用 /ch save。
| 设置项 |
描述 |
|
| name |
频道名称 |
|
| nick |
频道昵称 |
|
| password |
频道密码(留空表示无密码) |
|
| color |
频道颜色(使用 Wiki 中的代码或常见名称) |
|
| distance |
消息能被听到的玩家之间的最大距离(0 表示全局) |
|
| shortcutAllowed |
允许使用 /<nick> <msg> 快速发送消息而无需切换焦点 |
|
| worlds |
频道允许的世界列表 |
|
| bans |
被封禁的玩家列表 |
|
| mutes |
被禁言的玩家列表 |
|
| moderators |
管理员列表 |
|
| format |
频道格式(参见“消息格式标签”部分以获取可用标签) |
|
| verbose |
启用加入/离开消息 |
|
| focusable |
启用通过 /ch <channel> 将频道设置为活动状态 |
消息格式标签
| 标签 |
替换内容 |
|
| {default} |
默认格式(位于 config.yml 中) |
|
| {name} |
频道名称 |
|
| {nick} |
频道昵称 |
|
| {color} |
频道颜色 |
|
| {msg} |
消息内容 |
|
| {sender} |
发送者的显示名称 |
|
| {plainsender} |
发送者的用户名 |
|
| {world} |
发送者所在的世界 |
|
| {prefix} |
发送者的前缀 |
|
| {suffix} |
发送者的后缀 |
|
| {group} |
发送者的主要群组 |
|
| {groupprefix} |
发送者的主要群组前缀 |
|
| {groupsuffix} |
发送者的主要群组后缀 |
|
| {convoaddress} |
To 或 From(仅用于私聊) |
|
| {convopartner} |
发送者或接收者(仅用于私聊) |
本地化
Herochat 5.5 及更高版本支持国际化。区域设置由 config.yml 中的 'locale' 设置指定,默认为 en_US(英语/美国)。目前可用的本地化包括 en_US(英语/美国)、de(德语)和 pt_BR(葡萄牙语/巴西)。如果你有将 Herochat 本地化为未在此列出的语言的兴趣,请通过私信通知我。
开发者指南
你可以通过监听 ChannelChatEvent 来获取基于频道的消息信息。这个自定义事件包含消息发送者(一个 Chatter 对象)、消息发送到的频道、消息发送尝试的结果(一个 Chatter.Result 对象),以及导致 ChannelChatEvent 的原始 Bukkit PlayerChatEvent。如果你更改了消息发送到的频道,你应该调用 event.setResult(event.getSender().canSpeak(newChannel)),除非你想在发送消息之前忽略正常检查。
常见问题解答 (FAQ)
- 问:权限中的 <channel> 是什么意思?*
- 答:* 权限中的 <channel> 部分应替换为相应频道名称的小写形式。
- 问:如何让插件 XYZ 的数据显示出来?*
- A:* 每个插件处理聊天修改的方式都不同。许多插件会在消息格式中搜索特定字符串(例如 Towny 中的 {town}),并将其替换为相应的数据。你需要参考各个插件的文档,以了解它们对消息格式的期望。
- Q: 为什么自动加入频道不起作用?*
- A:* 授予 herochat.autojoin.<channel> 权限仅在玩家**首次**登录服务器时生效。更具体地说,只有当玩家在登录时没有 chatter 文件时,此权限才会生效。如果用户之前已经登录过(且 Herochat 处于激活状态),则其之前的频道会被加载,自动加入功能将不再起作用。这一行为与 Herochat 的先前版本一致,并未改变。
- Q: 为什么我的所有消息在频道格式中没有 {world} 标签的情况下仍显示 [world]?*
- A:* 另一个插件正在添加 [world] 文本。最常见的罪魁祸首是 Multiverse。请查阅 Multiverse 的配置以禁用它。
- Q: 有哪些命令?*
- A:* 在游戏中输入 /ch help 可查看 Herochat 的命令列表。若要获取某个特定命令的更详细信息,可将问号 (?) 作为第一个且唯一的参数提供,例如 /ch join ? 将提供关于 join 命令的更多详情。
- Q: 你能移除某个命令吗?XYZ 命令与其他插件冲突。*
- A:* 据我所知,Bukkit 目前仍不允许动态注销命令,因此无法做到这一点。不过,你可以打开 Herochat.jar 内部的 plugin.yml 文件,并移除任何不需要的命令/别名。
- Q: 为什么我的管理员在重新登录后会被踢出所有频道?*
- A:* 你可能正在使用 PEX,并且可能给管理员赋予了 * 权限。这意味着他们被授予了 herochat.force.leave.* 权限,并在登录时被强制退出所有频道。你需要停止授予 * 或否定 herochat.force.leave.* 权限来解决此问题。
[/code]
支持
HeroChat 的问题报告和功能请求应发布在 Mantis 上。你也可以加入 esper.net IRC 服务器上的 #Heroes 频道来提问。
捐赠!
正如大家所知,创建和维护像这样的插件需要大量的时间和精力。如果你喜欢使用 Herochat,请考虑捐赠以支持其开发。
Continued development can be found at the new premium resource here.
Herochat 5
A Chat Channel System for play.hc.to
Herochat 5 is a complete rewrite of the previous version of Herochat. For those of you unfamiliar with Herochat, this plugin provides a highly configurable channel system for SMP chat. Herochat's primary purpose is to make player chat on large servers both manageable and readable. Each chat channel provides a chatroom for channel members to discuss in without broadcasting messages to everyone on the server at once. Players can be in multiple channels at once but can only have one active or focused channel that they speak in at a time.
Upgrading from Herochat 4.x? Read this:
If you are upgrading from Herochat 4.x or earlier, you will need to ditch your configs - all of them. Sorry, but it had to be done. There are now commands to modify channels in-game so hopefully setting up your channels won't be as painful.
Main Features
- Configurable chat channels
- Password protected channels
- Permissions based protections for almost every imaginable action
- Channel moderation (kicks, bans, mutes, etc.)
- Quick messaging (messaging another channel without changing your active channel)
- Private messaging (/msg or /tell) including persistent private conversations
- Simple integration with most chat tags from other plugins (eg. Towny, Factions)
- Regex-based message censorship
Dependencies
This plugin requires Vault
Permissions
| Permission |
Purpose |
|
| herochat.create |
allows channel creation |
|
| herochat.save |
allows forcing saves on player/channel data |
|
| herochat.reload |
allows forcing reloads on player/channel data |
|
| herochat.mod |
allows use of /ch mod |
|
| herochat.mute |
allows use of /ch mute |
|
| herochat.pm |
allows use of /msg |
|
| herochat.emote |
allows use of traditional emotes |
|
| herochat.emote.<channel> |
allows using emotes in a channel |
|
| herochat.join.<channel> |
allows joining a channel |
|
| herochat.leave.<channel> |
allows leaving a channel |
|
| herochat.speak.<channel> |
allows speaking in a channel |
|
| herochat.kick.<channel> |
allows kicking from a channel |
|
| herochat.ban.<channel> |
allows banning from a channel |
|
| herochat.mute.<channel> |
allows muting in a channel |
|
| herochat.remove.<channel> |
allows deleting a channel |
|
| herochat.color.<channel> |
allows &c style colors in chat |
|
| herochat.info.<channel> |
allows use of /ch info on a channel |
|
| herochat.autojoin.<channel> |
forces automatically joining a channel upon first login |
|
| herochat.focus.<channel> |
gives the ability for players to focus the channel |
|
| herochat.force.join.<channel> |
forces a player to join a channel on every login |
|
| herochat.force.leave.<channel> |
forces a player to leave a channel on every login |
|
| herochat.modify.nick.<channel> |
allows changing a channel's nick |
|
| herochat.modify.color.<channel> |
allows changing a channel's color |
|
| herochat.modify.distance.<channel> |
allows changing a channel's distance |
|
| herochat.modify.format.<channel> |
allows changing a channel's format |
|
| herochat.modify.shortcut.<chanenel> |
allows changing whether a channel allows quick messaging |
|
| herochat.modify.password.<channel> |
allows changing a channel's password |
|
| herochat.modify.verbose.<channel> |
allows changing whether a channel shows join/leave messages |
|
| herochat.admin.stealth |
allows being hidden from 'No one hears you' detection |
|
| herochat.admin.unignore |
allows the user to not be ignored |
|
| herochat.color.colortype.channel |
allows for bold/italics/etc (only in latest dev) |
Some of these permissions are granted automatically to moderators of a channel (these can be changed in the main config). Most servers will want to grant everyone herochat.join.*, herochat.speak.* and herochat.leave.* and then revoke permissions for restricted channels using the appropriate negated permissions (eg. ^herochat.join.staff in bPermissions).
Configuration
Channels are created using /ch create <name> [<nick>] which takes the channel's name and nickname (optional) as arguments. Once this is done, a configuration file for the channel is created in plugins/Herochat/channels. The channel's settings can then be modified either by hand or via the "/ch set" command in game. Type /ch set ? to get more information on this command. The available configuration settings are listed and explained below.
If you make changes by hand (via a file editor) you can use /ch reload to load the changes. This will overwrite any changes made by commands in-game during this time. On the other hand, if you want to force a save of changes made via in-game commands, you can use /ch save.
| Setting |
Description |
|
| name |
the channel's name |
|
| nick |
the channel's nickname |
|
| password |
the channel's password (leave blank for no password) |
|
| color |
the channel's color (use the codes or common names from Wiki) |
|
| distance |
the maximum distance between players for messages to be heard (0 is global) |
|
| shortcutAllowed |
allows use of /<nick> <msg> to quickly send messages without changing focus |
|
| worlds |
a list of the channel's allowed worlds |
|
| bans |
a list of banned players |
|
| mutes |
a list of muted players |
|
| moderators |
a list of moderators |
|
| format |
the channel's format (see the Message Format Tags section for available tags) |
|
| verbose |
enables join/leave messages |
|
| focusable |
enables setting a channel as active with /ch <channel> |
Message Format Tags
| Tag |
Replacement |
|
| {default} |
the default format (found in config.yml) |
|
| {name} |
the channel's name |
|
| {nick} |
the channel's nick |
|
| {color} |
the channel's color |
|
| {msg} |
the message |
|
| {sender} |
the sender's display name |
|
| {plainsender} |
the sender's user name |
|
| {world} |
the sender's world |
|
| {prefix} |
the sender's prefix |
|
| {suffix} |
the sender's suffix |
|
| {group} |
the sender's primary group |
|
| {groupprefix} |
the sender's primary group prefix |
|
| {groupsuffix} |
the sender's primary group suffix |
|
| {convoaddress} |
To or From (only used for private messages) |
|
| {convopartner} |
the sender or receiver (only used for private messages) |
Localization
Versions 5.5 and later of Herochat support internationalization. The locale is specified by the 'locale' setting in config.yml, which defaults to en_US (English/America). Available localizations currently include en_US (English/America), de (German), and pt_BR (Portuguese/Brazil). If you are interested in localizing Herochat into a language not listed here, please let me know through a PM.
For Developers
You can find out information about channel-based messages by listening for a ChannelChatEvent. This custom event contains the message sender (a Chatter object), the channel the message is being sent to, the result of the messaging attempt (a Chatter.Result object), and the original Bukkit PlayerChatEvent that resulted in the ChannelChatEvent. If you change the channel the message is being sent to, you should call event.setResult(event.getSender().canSpeak(newChannel)) unless you want to ignore the normal checks before sending the message.
Frequently Asked Questions (FAQ)
- Q: What does <channel> mean in the permissions?*
- A:* The <channel> part of a permission should be replaced with the appropriate channel's name in all lowercase.
- Q: How do I get this to show data from plugin XYZ?*
- A:* Every plugin handles chat modifications differently. Many plugins will search a message's format for a particular string (such as {town} in Towny's case) and replace it with a piece of data. You will need to refer to each plugin's documentation to see what it expects in the message format.
- Q: Why doesn't autojoining work?*
- A:* Granting the herochat.autojoin.<channel> permission only has an effect the FIRST time a person logs into the server. More specifically, this only takes effect if the player doesn't have a chatter file when they log in. If a user has logged in before (with Herochat active) then their previous channels will be loaded and autojoins will have no effect. This behavior has not changed from previous version of Herochat.
- Q: Why do all my messages say [world] when I have no {world} tag in the channel format?*
- A:* Another plugin is adding the [world] text. The most common culprit is Multiverse. Consult the Multiverse config to disable it.
- Q: What are all the commands?*
- A:* Type /ch help in-game to see a list of Herochat's commands. You can get more detailed information on a particular command by providing a question mark (?) as the first and only argument, i.e. /ch join ? will provide more information on the join command.
- Q: Can you remove a command? XYZ command is conflicting with another plugin.*
- A:* Bukkit still doesn't allow dynamic unregistration of commands AFAIK, so this isn't possible. What you can do, however, is open up the plugin.yml file inside Herochat.jar and remove any unwanted commands/aliases.
- Q: Why are my admins kicked out of every channel when they relog?*
- A:* You're probably using PEX and you've probably given your admins * as a permission. This means they are given the herochat.force.leave.* permission and are forced out of every channel when they log in. You'll need to stop granting * or negate the herochat.force.leave.* permission to fix this.
[/code]
Support
Issue reports and feature requests for HeroChat should be posted on Mantis. You can also join #Heroes on the esper.net IRC server to ask questions.
Donate!
As many of you know, creating and maintaining plugins like this one requires a lot of time and effort. If you enjoy using Herochat, please consider donating to support its development.
评论 0
登录后参与评分
还没有评论,来抢沙发吧