Sueta

PlayerMention - Completely Recoded

4.0

When a player says your name in chat it will notify you

·Plugin
Tested MC versions
1.8, 1.9, 1.10, 1.11, 1.12, 1.13, 1.14, 1.15, 1.16, 1.17, 1.18, 1.19, 1.20, 1.21, 26.1, 26.2, 26.3

PlayerMention
Let players know when someone mentions them in chat.

Spigot & Paper • Minecraft 1.8 – 26.3 • One Plugin

<Alex> hey @Steve, meet me at spawn!

When a player types @steve (or just Steve), Steve hears a sound, sees a notification and the name lights up in chat.
@everyone reaches the whole server. Players choose how they want to be notified,
and you can change everything from an in-game menu without touching a file.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
FEATURES

  • Eight notification types
    Sound, chat message, action bar, title, boss bar, particles, toast pop-up and dialog window. Turn each one on or off, separately for player and @everyone mentions.
  • Highlighted mentions
    The name is recolored right inside the chat message, with hex colors and gradients on 1.16+.
  • Player settings menu (/pm settings)
    Each player picks their own notification types and sound (with volume and pitch), mutes mentions for a while, or ignores specific players.
  • Admin menu (/pm admin)
    Change any option in game. Changes are saved to config.yml straight away, and the file's comments are kept.
  • Clickable notifications
    Hover text, plus a click that suggests a command (by default, click "Steve mentioned you" to start a reply), runs a command, opens a link or copies text.
  • Spam protection
    Cooldowns with a friendly "wait X seconds" message, and players can't mention anyone they can't see, so vanished staff stay hidden.
  • Fully translatable
    Every message and every menu text lives in messages.yml.
  • Plays nicely with other plugins
    Only the mention is recolored, so your chat format is left alone. On Paper, hover text and links from other chat plugins are kept. PlaceholderAPI placeholders work in notifications, and Marriage private chat is supported.
  • Painless upgrades
    Coming from 3.x? Your old settings are converted automatically. New options are added to your config on future updates without losing your values or comments.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
COMPATIBILITY

Runs on Spigot or Paper (and their forks), Minecraft 1.8 through 26.3, from the same JAR. Use whichever Java version your server needs; PlayerMention itself runs on Java 8 or newer.

Some notification types only exist in newer Minecraft versions. On older servers they're simply skipped and everything else keeps working:

  • Sound, chat, action bar, title, boss bar, particles: every version (1.8+)
  • Hex colors and gradients: 1.16+ (older versions show the closest classic color)
  • Toast pop-ups: 1.12+
  • Dialog windows: 1.21.6+ on Spigot, 1.21.7+ on Paper

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
GETTING STARTED

  1. Download PlayerMention-4.0.jar and put it in your server's plugins folder.
  2. Restart the server.
  3. That's it! Mentions work straight away. Type /pm admin in game to adjust anything.
Upgrading from 3.x

Replace the old JAR and restart. Your config.yml and messages.yml are converted to the new layout automatically, and the originals are kept in plugins/PlayerMention/backups/.

Worth knowing:

  • Mentions now match whole words only: @steve no longer matches Steven.
  • pm.use is now always required to mention, and everyone has it by default. This replaces needPermissionToMention.
  • /pm config was removed. Use /pm admin, or edit config.yml and run /pm reload.
  • The Skript, MVdWPlaceholderAPI, Essentials, FactionChat, mcMMO, SuperVanish and PremiumVanish hooks were removed because their APIs had changed. Vanished players are still protected, since hidden players can't be mentioned.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
COMMANDS

/pm is short for /playermention. Type /pm on its own to see the commands you can use.

  • /pm toggle - Turn your mention notifications on or off
  • /pm settings - Open your personal settings menu
  • /pm quiet <time> - Mute mentions for a while, e.g. /pm quiet 30 or /pm quiet 2h
  • /pm quiet off - Stop muting mentions
  • /pm ignore <player> - Stop being notified when that player mentions you
  • /pm unignore <player> - Be notified by that player again
  • /pm ignore - List the players you ignore
  • /pm everyone - Mention everyone online
  • /pm preview [everyone] - See what a mention looks like with your settings
  • /pm admin - Open the admin menu
  • /pm reload - Reload config.yml and messages.yml

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
PERMISSIONS

Everything players need is allowed by default. Admin features are for operators by default.

  • pm.use - Mention other players (everyone)
  • pm.toggle - /pm toggle (everyone)
  • pm.settings - Settings menu, quiet mode, ignore list and previews (everyone)
  • pm.everyone - Mention everyone with @everyone or /pm everyone (operators)
  • pm.bypass - Skip the mention cooldown (operators)
  • pm.update - Be told when a new version is out (operators)
  • pm.admin - Admin menu and /pm reload; also gives pm.everyone, pm.bypass and pm.update (operators)
  • pm.* - All of the above (operators)

Only some ranks should be able to mention? With a permissions plugin such as LuckPerms, set pm.use to false for your default group and true for the ranks that may mention.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CONFIGURATION

PlayerMention creates two files in plugins/PlayerMention/:

  • config.yml decides how mentions are detected and how players are notified. Every option has a comment explaining it.
  • messages.yml contains every message and menu text, ready to edit or translate.

The easiest way to change settings is in game with /pm admin. If you edit the files yourself, run /pm reload afterwards. If a file has a mistake, PlayerMention keeps your previous settings and tells you in the console which option is wrong.

Messages support classic & color codes, hex colors ( &#2FC0FC) and gradients ( <gradient:#2FC0FC:#A78BFA>text</gradient>), plus %player%, %nick% and any PlaceholderAPI placeholder.

» Read the full configuration guide «

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
SUPPORT

A player isn't getting notified. Why?

Check that they haven't turned mentions off (/pm toggle), muted them (/pm quiet) or ignored the sender, and that the notification type is turned on in config.yml. Set debug: true in config.yml and the console will explain every mention it handles.

Can players mention vanished staff?

No. Players can't mention anyone they can't see. Set detection.ignore-hidden-players to false to change this.

Does it work with my chat plugin?

Yes. PlayerMention only recolors the mention inside the message and leaves the rest of the chat format alone. On Paper it also keeps hover text and links added by other plugins.

For developers: OnMentionEvent

PlayerMention fires net.hypexmon5ter.pm.events.OnMentionEvent before notifying each player. Cancel it to stop that player's notification.

@EventHandler
public void onMention(OnMentionEvent event) {
    Player sender = event.getMentioner();
    Player target = event.getPlayerMentioned();
    if (event.isEveryoneMention() && isBusy(target)) {
        event.setCancelled(true);
    }
}

The event is usually asynchronous because chat is. Check event.isAsynchronous() and schedule a task before using Bukkit methods that must run on the main thread.

Found a bug or have an idea? Please open an issue on GitHub and include your PlayerMention version, server version and console log. Please don't use the review section for bug reports; I can't reply there properly.

Bug reports & suggestions • Source code

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Created by Exus-Kun, maintained by HYPExMon5ter.
Built with XSeries, BoostedYAML and bStats. PlayerMention sends anonymous usage statistics to bStats (no player names or chat); opt out in plugins/bStats/config.yml.

Similar projects

Plugin →