ChatHighlighter
ChatHighlighter
Overview
ChatHighlighter highlights the mention of anyone's name, whether it be partial or complete, and either displays it to everyone or just the mentioned player.
Commands
Command | Description |
---|---|
/chat reload | Reload ChatHighlighter |
Permissions
Permissions node | Description |
---|---|
chat.highlight | Allows players to see their names highlighted |
chat.admin | Allows players to reload ChatHighlighter |
Features
- ChatHighlighter's more prominent feature is its ability to search through each message and return the exact partition taking into consideration the minimum number of characters to search for. This is possible using an algorithm I designed myself, and is available and explained here
- Choose to use displayname for the sender - if this is set to true, the name of the sender will appear the same, copying over any color formatting; if set to false, it will use the sender's exact name without color formatting, allowing you to create a custom format under the format section.
- Format the appearance of the sender and receiver in chat
- Choose whether to broadcast all highlights to all players, or just the receivers
- Highlight all player names who are mentioned.
- Play a sound when a name is mentioned
Configuration
Formatting
When formatting, any color code can be used, as demonstrated in the template configuration file that is generated when the plugin is first loaded. Note that you must use @sender in the sender section and @receiver in the receiver section, to refer to the names of the players.
Sounds
When you want to use a sound if a player name is mentioned, you must set play to true in the sound section. Any sound in Minecraft can be used; refer to the sound name in the sound section. A list of available sounds can be viewed here NOTE: when you enter a sound name, you can enter it lower case and without underscores (as demonstrated in the template configuration file), however, what you enter MUST be translatable to one of the sound names in the bukkit docs.
For example, 'note piano' is translated to NOTE_PIANO, which will be picked up by bukkit. However, 'note pianooo' is translated to NOTE_PIANOOO, which will not be picked up by bukkit.
Example Configuration
options: minimum: 4 announce: false sender-displayname: false sound: play: true sound: 'note piano' format: sender: '&a@sender > ' receiver: '&a@receiver'
This will search for a username of length 4 or more characters long in player messages. It won't announce it to everyone on the server, it will just send it to the player whose name is mentioned. When the player sees this message, my name (the sender) will be shown in the color Green. If use-displayname is set to true, since the color for the admin group is red on my server, my name will show as red instead. It will play a noteblock piano sound to the player.
Remember, for the name of the sender, use @sender. For the name of the receiver, use @receiver.
Yeah great update!
Great update! Thank you for this
@Jobsti84
This request isn't as important as others, but I will add the option when all other important ones are complete. The reason for this is that that I want to allow easy access for identification on servers. For example, if someone wants my help in the server I own and administrate, they will usually refer to me as "dragon", and they do this with a lot of other admins and players on the server.
It's human nature to identify and communicate with someone easily through the use of nicknames, especially on computer games such as Minecraft.
Sorry for new post, but edit doesn't work anymore.
request The name-highliter souldn't look for capital letters.... so Jobsti and jobsti should be highlited.
Ah Thanks, now I see the Permissions in the main post, so they could be case sensitive, no problem.
But you should add them to your plugin.yml
Little request: /chl reload -> For quick testing the colors onfirst configuration. -> ChatHighlighter.admin
@Jobsti2
Permissions are case sensitive, and I'm still in development of this. Thankyou for your contribution, and I will make.
The %ALL feature was an experimentation; it's meant to act as a "broadcast" and will probably be removed, since this broadcast feature is in many of the top chat.
I'll add a Todo list in the main post.
How are the permissions?
If I as admin with '*' write someones name, it works, but all other groups: nothing happens...
- chathightlighter or - chathightlighter.* doesn't work.
plugin.yml says: /chathightlighter and /ch..
/chathightlighter -> Does nothing.
/ch overwrites the Herochat commands, so I have to delete this line from the plugin.yml,
would be good, if you alter that to something like /chl
my ingame Name is Jobsti.
If I write %ALL Jobst -> I see green "Jobst"
If I write %ALL Jobsti -> I see white "%ALL Jobsti"
Herochat #165
@lollo333
Note, this isn't recommended. For example, my ingame name is Dragonphase. if someone types "I made a dragon today", it will send the message highlighted to me.
I can add an option for this regardless.
@Jobsti2
The plugin uses DisplayName for the sender (the name that is shown on the screen), but uses the actual name of players when they are mentioned. so yes, HeroChat support should work. (I use it on my dedicated server which uses permissionsEx prefixes and essentialschat format).
Can you add nicks whit this, e.g my name is lollo333 can I make so it highlights when someone type lollo?
Super great!
Is this compatible with Herochat? (Dynmap would also be nice)
Actual builds:
http://ci.herocraftonline.com/job/Herochat/
@Willbbz
Just uploaded the file. Awaiting approval now. Will be up soon!
Looking forward to this. Something I've only seen done with client mods.