Mods Server

Simple MSG Format

  • 29 views • 0 today
  • save_alt 0 downloads
Game Version
Minecraft 26.2
Progress
100% complete
  • 1
  • 0
Verdros
Lvl 14 • Journeyman Server owner
4
Simple MSG Format Minecraft Mod

You want to make the vanilla /msg command output something that isn't boring and hard to see? You've clicked on the right plugin!

This project gives you full control of what /msg spits when ran, you can color and re-organize it as much as you need.

Default config.yml:

# Custom /msg Formatter

# PLACEHOLDERS
# <player> -- You, the player.
# <other> -- The player on the other end on the line.
# <message> -- The message that was sent through /msg.
# & -- Automatically converted to Minecraft legacy color codes. (§)


# Inbound format
# Default: "&6[&e<other> > <player>&6]:&f <message>"
inbound: "&6[&e<other> > <player>&6]:&f <message>"


# Outbound format
# Default: "&6[&e<player> > <other>&6]:&f <message>"
outbound: "&6[&e<player> > <other>&6]:&f <message>"



# Display /msg receival above the hotbar, in the action bar?
action-bar: false
action-bar-format: "&6New message from &e<player>"

Using this default config, /msg looks like this:
[​IMG]

But this is just a simple base design, you can do much more.
Here are some MORE examples:

inbound: "&a✉ &b[&ffrom <other>&b] &a>&f <message>"
outbound: "&a✉ &b[&fto <other>&b] &a>&f <message>"

Simple MSG Format Minecraft Mod

inbound: "&6[​PM]&e <other> -> ME&6:&f <message>"
outbound: "&6[​PM]&e ME -> <other>&6:&f <message>"



And that's nothing compared to what you could make this for your server.

If you want to style messages without reloading your server 30 times, give yourself the permission "simplemsgformat.reload" and run /reloadmsg.

And if msg styling isn't enough for you, you can make a message notification in the action bar, which looks like this:



And if and when you don't want someone to send you twenty-thousand messages per minute, this also comes with the command "/msgtoggle" which disables people from throwing any /msg at you.

As of now, the messages for toggling are not in the config, may come later.


And of course we couldn't forget /r.
Who forgets /r?
using /r (reply) continues the /msg with the most recent person who messaged you or you messaged.

"But how do I moderate these messages?"
Easy! Give you and your moderators the permission "simplemsgformat.spy" and now you can tell when someone is being... horrible.
Here's what it looks like in game:


AND these messages are stored inside your console cleanly too.


"But this doesn't let me STOP bad messages!"

Well, it doesn't stop here for a reason.

This message formatter gets messages like this:


@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)

public void onCommand(PlayerCommandPreprocessEvent event) {
string command = event.getMessage();

if (command.startsWith("/msg ")) {


Your own moderation plugin:

If you want to stop a message, you need your plugin to intercept, check, and cancel /msg AND /r before it reaches SimpleMsgFormat. Using a priority of LOWEST, LOW, NORMAL, or HIGH is recommended, but HIGHEST may cause SimpleMsgFormat to read the msg and send it before your plugin can stop it, and when it's sent, you cannot unsend it.

If you use a different moderation plugin:

If the moderation plugin you use can intercept command events, and it has /msg and /r as a default, you usually dont have to do anything, but in case it does have command interception but it doesnt stop commands, make sure its priority is set to LOWEST, LOW, NORMAL, or HIGH and make sure it stops the event. If your plugin doesnt read /msg, you can't stop bad messages.
If so, you have two options: Find a new moderation plugin (better long term!!) or Find a new msg formatter (boooo)


Aaaand, thats it.
No disabling a bunch of other random features that you didnt want.
You came for custom styled /msg.
Not for 20 other things you didn't want and still have to manage.

Full list of commands and permissions:

Perms:
simplemsgformat.reload
simplemsgformat.spy

Commands:
/reloadmsg | requires reload perm
/r
/msgtoggle

/msg is a vanilla command.

More like this

  Have something to say?

Welcome