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.
@lordkainzo
Hello I am using this plugin and it works great! The only thing is I got a question. I have a general and a trade chat. They are both global. I want people to could see them both in their chat while they chat in one of them. How do I do?
What am I missing? One of our moderators stands beside me (I'm an admin) and speaks to me in local channel. Distance = 100 blocks. I can hear him, but he gets "no one hears you". When he goes beside a normal player and speaks in local channel, everything is OK. So seems I am invisible from local!
I am sure this has been discussed at some point, but cannot go through 35 pages of discussion to find the solution!
@xZeventh
Yeah moving from groups is easy there are two ways one is from the console in game and one is just editing that permissions.yml file.
Command: If you noticed in my permissions file and in the one I edited for yours there is a number for a rank this basically gets bigger and smaller to be used for promotion and demotion. So if you have correct permissions you can say "/pex promote" and "/pex demote". https://github.com/PEXPlugins/PermissionsEx/wiki/Ranks-%28Promotion-and-Demotion%29
permissions file: If you notice whenever a user logs on and you save the permissions.yml file will get a bunch of users added at the end under
users:
Then they will have the name of the group they are in just simply change the group in there then use /reload permissionsEx in game to reload it or restart your server.
Oh and I didn't add and check every single one, but when I wanted to do something I had to try several different things often because I wasn't sure what plugin was handling it since a lot of plugins will have the same functionality. It is really getting use to the syntax and if there is an error removing things and then adding them back in. It takes time for sure, but once you sort of understand them it isn't that bad. That and it's much better to deal with simple things then a crap ton of them and any one of them could be causing the issue. Then again I am a programmer so I have been dealing with bad language parsing forever. Dealing with YML files makes me feel like I am programming in Visual Basic (god what a horrible language) so space and character sensitive. Not very forgiving at all. Anyway I will end it with that info. If you want to know anymore check out the https://github.com/PEXPlugins/PermissionsEx/wikipex docs and PM me I hate to detract from HeroChat much more in the comments.
@MusicMonkey5555
Thanks a gazillion, it finally works! I'm just not sure how to move me from group guest - default to owner, but meh. Just for the hell of it, you wouldn't happen to know? :P Also, adding, then checking all the way - That must take a life time lol
@DThielke: Finnish localisation for HeroChat (1st version) is ready. See your PM's.
@xZeventh
I didn't do it for all of them and there may be some messed up spacing, but:
http://pastebin.com/Ek4v9Nxx
I mean really you should be able to take my example and then just start adding nodes. That is what I do. I don't add all my permissions at once. I add each one, then reload and see if something broke or an error was thrown.
I mean if it helps here is mine:http://pastebin.com/vasuKqWX
There are some plugins that no longer work still in there. I need to clean it up, but am really waiting until bukkit 1.2 recommended comes out.
I'm sorry if this has come out before: after upgrading from 4.x to 5.4.0, all chat messages in chat log are complete garbage, since they contain some sort of escape codes:
2012-03-03 10:34:55 [INFO] [32m[g] [35m<Thelacan>[37m[37m mo[0m 2012-03-03 10:34:57 [INFO] [32m[g] [32m<jymy1000>[37m[37m mo[0m 2012-03-03 10:35:00 [INFO] [32m[g] [36m<GGov>[37m[37m Moro[0m
As such, the chat log is completely useless to me as a server admin. Can you please fix this ASAP?
@MusicMonkey5555
For Craftbukkit I'm using the latest dev build( I know, but recommend wouldn't work ) Basically, I'm actually using the latest everything. My Worldguard is currently bugged, so everytime I move to another block, I get an error [Servere]Could not pass event PlayerMoveEvent to worldguardorg.bukkit.event.EventException but that's pretty much it. None regarding the chat.
EDIT: After moving prefix/suffix, I got an Internal Server Error :( How do you copy from cmd? You know - In case you need it :3
EDIT: Fuck me - when I used your pastebin permissions.yml, the prefix worked.. Any idea how I can add that part to my own permissions.yml? Maybe do me a favor and add them and put it up on pastebin? :*
@xZeventh
Try moving the prefix right under the group rather than having it in info, actually just remove the info and build. Like try my simple example first. The simpler the better then work on the actual stuff you want.
Also what version of everything are you using?
Are there any errors in your server.log?
@MusicMonkey5555
Done, I think, atleast. Hopefully, my permissions.yml is correct? http://pastebin.com/8vZ2DDHW Prefix/suffix still doesn't work though :/ Thanks in advance :)
EDIT: I've removed essentials completely, it kept bugging me. So ignore the essentials nodes :L
@xZeventh This is all assuming you are on Bukkir R6 cause when I was on a previous release I used a pretty old version of HeroChat.
Ok so use HeroChat 5 and let it set the default configuration values (delete the folder in the plugins folder).
Then install vault since it is required for HeroChat5 and just leave the defaults.
Then install PermissionsEx and only that plugin (worry about adding your other ones in later, because the more there are the more complicated it gets). It comes with 3 jars (ChatManager.jar, Modifyworld.jar, and permissionsEx.jar), make sure and only use Modifyworld and PermissionsEx.jar (no ChatManager.jar) For PermissionsEx you should be able to use the default values in the config which should use the file permissions.yml
Then that file should look something like this: http://pastebin.com/ayFVX9WM
This should make it so that anyone who joins your server can do everything and will have the prefix [Guest].
That should work and if it doesn't let me know.
After that you can slowly add to the permissions and add more groups with different prefixes and your other plugins. The key is make sure no other chat plugin is installed like the one that comes with PermissionsEx (ChatManager.jar) or the one that comes with Essentials (EssentialChat.jar)... because basically who knows what one will end up taking control.
I feel your pain though it took me forever to get permissions working correctly with prefixes and everything. Drove me nuts for months.
Well, first things first. My prefixes and suffixes will not work, I've used 4 different permissions.
@xZeventh Ok so what are you trying to do? I guess that is what I need to know.
@MusicMonkey5555
Uhm.. So could you breakdown, exactly what I need to do? I'm quite confused atm :P
@jpell1221 If you are talking about prefixes in chat Hero chat will do that you don't need chat manager, that is probably the problem is chat manager wants manage chat so you need to make sure to uninstall/disable all chat programs, except hero chat. Then use some plugin that lets you set the prefix variable and chapmanager will insert it. If that makes sense.
So for instance PEX or any other permission manager lets you set a prefix for a group and then all those people when they chat will have the prefix you set if they are in that group. I let HeroChat 5 have it's default values in all configuration files and then just set PEX to work the way I want. I am just using PEX as an example of something that sets the prefix value. Not sure what you want to use the prefix value for. Like what you want to prefix for what reason (the group they are in, the state they are from...)
Running without essentials seems 1000x times easier to me :')
How do i disable /msg and /reply it interferes with essentials
All I seem to be able to find in herochat/config.yml is found at this link: http://pastebin.com/3kpTTfRC Is it supposed to be this way, and expects me to add anything in particular? I've browsed a site for a while, and to me it seems like something is missing in config.yml :L Maybe I've mixed something up mentioned site: https://github.com/Herocraft/HeroChat/wiki/Setup Help please, I'm fairly new with all this, yet desperate to implement this awesome plugin :)
If it can be of any help to solving my problem, here's also my Herochat/channels/Global.yml http://pastebin.com/hFgNVxCT
Also, I can't make my prefixes work :L I've tried several things using permissions. Any ideas?
<<reply 568233>>
do you have the herochat.speak node?
OK so i am going to go crazy and i want to bash my head against the table. I can talk in hero chat but nobody else can. It says "You do not have permission for that"
WTF is going on .