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.
https://www.youtube.com/watch?v=GWv8dzCtPmc
[/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.
@subarct1c
I agree that HeroChat should update their documentation, especially as HC5 is a complete rewrite. One thing I changed in my setup is having the default formatting for channels print the name of the channel as opposed to the nick. (Use {name} instead of {nick}). Trial and error prevailed here, as it wasn't mentioned in the docs. >_>
When citing permissions, the directions above are wrong. You need to deny before doing an implicit allow, or simply allow by itself. (Otherwise, using the example in the docs above, it would let players join/leave/speak in any channel, including staff chat!) To give a player permission for a channel, it should look something like this (this is the setup for my players):
I use PermissionsEx, so this should work for your setup. Just remember that if you put the .* first, it will override anything after it in the same parent/child node. If you have questions, let me know. :)
I'm having the same issue a few others are with it telling players that they dont have permissions for channels, though in my permissions config its setup correctly. I'm using the latest version of HeroChat, Vault, and PermissionsEx. I've also tried using upper case, lower case, and even the channels nick and it didn't have any effect.
@PublicPerv
I've been asking them the same question. There a wiki page that has info for version 4, but it's a year old and there have been a lot of changes.
Version 5 documentation anyone??
Another note about HeroChat: The color naming is unconventional and hard to discern. Please make a list of all the colors available. Constantly trying different names only to have it revert to white on each reload is a pain. Thanks.
Is there a beginner tutorial on how to use this. I am new to this because my server needs a new Chat plugin. My config file
http://pastebin.com/vn5qpfNg
But for global I put {default} but the ch wont show up help please D: I use PermissionsEX to.
Is it possible that "herochat.modify.verbose.<channel>" is missing from the list?
Why was the option to force a channel on a player on each login removed? I understand that I can remove the ability to leave a channel from a permissions group but I shouldn't have to. Perhaps add a herochat.force.<channel> permission? I mainly want this for my Global channel so that people can leave it but on their next login they will rejoin it.
Example: Player logs in, where others greet him on Global. However, he doesn't reply because he forgot that he left the channel on a previous login, thereby never hearing any messages.
Please bring this functionality back to HeroChat.
@Jobsti2
Start the persistent convo by typing /msg <player>. Any messages you send after that will automatically be routed to that person. End the conversation by focusing another channel again.
How to use the persistent private conversations?
@LordKainzo
You need to make the 'not use caps in permission' thing clearer.
Heyho, great, v.5! Works very well.
But two Requests:
Please implement the old short Healthbar. {healthbar}
Format:
private-message-receive:
private-message-send:
So I could define different colors for "to name" and for "from name"
@Crysillion
Use "/ch set <channel> verbose 0" in game or change the verbose item to false in the channel's file.
Any way to disable the messages of people leaving and joining in certain channels? For instance, I like the concept for channels such as clan channels or party channels, but when someone logs out and it says in Global chat, local chat, and help chat (they are autojoin), it's just annoying. lol. You basically see the same person has left something 4 times. 3 in the channels, 1 in Minecraft saying they left the server.
Is this an option at all?
If not, is there a way to disable leave messages, but keep join?
@LordKainzo
ah, im starting to see all the advantages of the in-house plugin coding XD (i've written a few simple ones, just to add the ease of access for users for some things in-game, but its a lot of work and time: something i have very little of any more :/ )
@4am
Negate the nodes if you wish the players to not leave.
@LanToaster
yes
@MatrixJ21 Herochat fully supports Bukkit Perms and any other perm system that FULLY supports it.
Permissions work, check your permission system.
@stargateanubis14
it is possible to integrate a prefix/suffix plugin, on Herocraft we have in-house title plugin that does this.
@Chromana
The perm system you use probably doesnt support Bukkit Perms or you arent using vault, perhaps? ;)
Can i Disable the "[CHANNEL] User has Left the Channel" and the same for Joined?
@Chromana
Well, they have screwed up permissions that much, they don't work. I'd expect a fix when 5.2 comes out, which can't be too far from now.
I'm having an issue with prefixes. I used to be able to use simple prefix (http://dev.bukkit.org/server-mods/simple-prefix) for assigning prefixes and suffixes, and HeroChat displayed the results properly. But now, for some reason, simple prefix gets full control over the chat output, leaving me with NO information regarding the channel status (and there's no HC integration into SP)
Is it possible, that you can have your own integration of prefix/suffix, with a simple permissions thing? On chat display, read for permissions for all prefixes, and concatenate them together, and put it in {hcprefix} ....or something of the like.
that would make my day 100x better, and i think a lot of other people would enjoy it too :)
@MatrixJ21
So what you're saying is that there is a bug which means no one can chat? How could the plugin makers screw up that much? Haha, a chat plugin where no-one can chat. Excellent.
Or is there a way to fix it?