NotifyUser
Currently available for 1.8 and 1.9-1.12.1.
NotifyUser is a quick-and-easy chat plugin for sending chat notifications. When a player "tags" another user in the chat area (e.g. "@Notch"; supports tab completion), their username will be highlighted and they will receive a customizable alert, using sounds already available in Minecraft.
As a result of a desire for a simple ping plugin that's still a bit more customizable, NotifyUser has several configuration preferences for choosing different sounds, muting notifications, tagging & pinging options.
Installing
Though customizable, NotifyUser works out of the box and requires no extra set-up to use. Just drop the Jar file into your server's plugin folder, restart, and you're good to go. Or, if you so wish, tweak the default configuration file. It's up to you!
How to use
Pinging a player
There are two ways to send notifications to other users, through public chat tagging and a command.
To ping a player from the chat, simply "tag" them with the appropriate symbol: Hey, @TeddyRoosevelt! What's up?
. The tagged username will become highlighted and the mentioned user will receive a sound alert. This is not case-sensitive, and it recognizes partial usernames (configurable), so @Teddy
and @teddyroosevelt
work just as well.
If you want to ping a player without making a public mention, you can type /nu [username]
without any symbol in order to notify them directly. They will receive a message saying who pinged them and a sound alert (these can be changed). The same name sensitivity as the first method applies.
Muting notifications
If a player wishes to not receive sound alerts or on-command pings, they can use /nu mute
. By default, text tag-highlighting will still go through, but both sound alerts and pings made through the /nu
command will be blocked. This acts as a toggle, and can be turned off by typing /nu mute
again.
Commands
All commands can also be executed with /notifyuser and /nfy.
General commands:
- /nu [username] - Send a notification to a specific user without typing into public chat.
- /nu help - Show all available NotifyUser commands.
- /nu mute - Toggle mute/unmute for incoming notifications.
Admin commands:
- /nu set [SOUND_NAME] - Set the notification sound to be heard by all players. (Refer to these lists of sounds: pre-1.9 | 1.9+)
- /nu reload - Reloads the NotifyUser configuration file.
Permissions
- NotifyUser.* - Gives access to all NotifyUser commands. (default: op)
-
NotifyUser.player.* - Gives access to all standard player permissions.
- NotifyUser.player.send - Allows a player to send in-chat and sound notifications. (default: true)
- NotifyUser.player.receive - Allows a player to receive in-chat and sound notifications. (default: true)
- NotifyUser.player.mute - Allows a player to mute any incoming notification sounds. (default: true)
- NotifyUser.player.highlight - Allows a player to see their name highlighted in chat when pinged. (default: true)
-
NotifyUser.admin.* - Gives access to all admin permissions.
- NotifyUser.admin.set - Allows you to set the notification sound for all players. (default: op)
- NotifyUser.admin.reload - Allows you to use the reload command to update the config. (default: op)
-
NotifyUser.override.* - Gives access to all overriding permissions.
- NotifyUser.override.notify - Always receive silent notification alerts regardless of
notify
option in config. (default: false) - NotifyUser.override.highlightall - Always highlight all in-chat notifications regardless of
highlight-for-all
option in config (default: false)
- NotifyUser.override.notify - Always receive silent notification alerts regardless of
-
NotifyUser.anonymous.* - Gives access to all anonymous permissions.
- NotifyUser.anonymous.send - Always send silent notifications without revealing your username. (default: false)
- NotifyUser.anonymous.receive - Always see the username of anyone who sends you a silent notification (takes precedence over NotifyUser.anonymous.sender) (default false)
Configuration
Options in config.yml
- notifications:
-
chat:
-
symbol
- Symbol(s) used when typing in chat to ping a user (e.g. @ # *)
-
highlight-color
- Set the color that tagged names will be highlighted with (e.g. &a, &b, &c...)
-
message-color
- Insert the default color of your chat to display after the tagged name.
-
highlight-for-all
- True or false. If true, all players will see every highlighted tag. If false, only the player who was tagged will see it highlighted.
-
min-name-length
- One must type at least this many letters to ping another player.
- Anything below will not be highlighted or make a ping noise.
-
allow-partial
- True or false. If true, partial names such as @mary can ping @MaryAnn32. If false, only @MaryAnn32 can be used to ping.
-
notify
- True, false, or anonymous. If true, the player pinged by /nu [username] will be told who sent it. If false, no message will be sent. If anonymous, the message will not specify the sender.
-
symbol
-
mute
-
sound
- True or false. If true, /nu mute will disable sound notifications for this player.
-
highlight:
- True, false, or all. If true, /nu mute will disable in-chat notifications targeted to player. If all, it will disable all in-chat notifications.
-
sound
-
messages (Use '&' color codes)
-
errors
- no-perm: Message seen after using a command without proper permissions.
- not-min: Tried to use /nu [username] with too little characters.
- not-found: Pinged a player that is offline or does not exist.
-
mute
- toggle: After toggling notifications with /nu mute.
- alert: Pinged a player whose notifications are muted.
-
ping
- from: Successfully sent a notification using /nu [username].
- to: Successfully received a notification using /nu [username].
- anon: Used instead when receiving an anonymous notification.
-
errors
Message Placeholders
When creating custom messages to be seen by players, there are several placeholders you should use:
- {sender} - Name of person that sent a ping notification.
- {receiver} - Name of person that was pinged.
- {min} - Minimum number of characters required to ping someone (set in
min-name-length
). - {toggle} - "unmuted"/"muted", depending on if the sender's notifications are disabled.
Custom messages can be colored using '&' color codes.
Setting up
There are several optional preferences for customization within the config.yml
if you so desire. After editing and saving the file, either restart the server or type /nu reload
to update the plugin's settings.
The notification alert
Changing the sound
You can change the sound a player hears when they are pinged with the /nu set [SOUND_NAME]
command in-game, or by editing notifications.sound-effect
in the config file.
To determine the name of the alert you want, refer to these lists of sounds: pre-1.9 | 1.9+). Be sure to include any underscores and correct capitalization.
Controlling volume and pitch
If you want to set how loud or high-pitched the sound is, you can do so by editing notifications.volume
and notifications.pitch
in the config file, respectively.
The volume
determines how loud or quiet the alert noise will be when mentioned or pinged. 1.0 corresponds to full volume.
The pitch
determines how high or low pitched it will sound. 1 represents the noise's normal range of pitch.
Tweak player mentions
The tag handle
The tag handle is the symbol that a player must type right before a username in order to activate the ping mention. If a valid username is tagged, it will become highlighted in the chat area for easy noticing, and a ping will be sent to that player (unless it is muted).
By default, the tag handle is @
, however it can be easily changed by editing chat.symbol
in the config. Though a single special character is reccomended, the tag handle can be any one string you wish (e.g. >>
or Wololo
).
You can also change the color that the tagged username will be highlighted by adding an "&" color code in chat.highlight-color
.
If needed, it is also recommended to change the default value (white) in chat.message-color
to whichever color regular chat uses (e.g. if you set this to light yellow in another plugin such as Essentials, you would put '&e' here). This does not override chat colors defined elsewhere; it only ensures proper formatting for messages containing pings.
Choosing how pings work
NotifyUser gives you the option of tweaking how a ping mention will be activated in the main chat or silent commands. You can change whether a full name is required or not and choose the minimum amount of letters of a username that a person must type in order to ping someone. Anything tagged below this number will be ignored, not highlighted, and no alert made.
To determine whether or not an on-command ping will alert the recipient or not, change chat.notify
to false. When true, the command /nu [username]
will send both a sound alert and silent configurable message `"SENDER has pinged you!" to the user. Alternatively, setting this to 'anonymous' will send a similar message without the sender's name.
Has anyone been able to get this to work with TownyChat? If someone is mentioned, you can read messages that are from chat channels you're not allowed to see. (If someone mentions me in staff chat, everyone on the server can see it, when they don't normally have access to staff chat, and they can't see any other staff chat messages.
@Androkai
This will need an update for 1.9 with the sound changes.
My chat uses green (&2) instead of white color for chat. The highlight-color option is nice but i need an option to set color back to green after. Could you implement this? Nice plugin *thumbs up*
If you could add the TAB integration too that'd be awesome!
If you could make it so it would change chat color and have a setting for it, That'd be awesome!
<mentioncolor>@<player> <chatcolor><message>
Great plugin! Keep going!