Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MessageStyler

Rewrite, restyle or reroute any message your Minecraft server sends — even messages from plugins that offer no formatting options at all.

Some plugin sends an ugly message and gives you no way to change it. No locale file, no config option, nothing. MessageStyler fixes that from the outside: it intercepts messages on their way to the player and lets you rewrite the text, move it to the action bar or a title, or delete it entirely.

Features

  • Works on any message — vanilla messages, plugin messages, messages from plugins never designed to be configurable
  • Automatic message keys — every message gets a stable 8-character ID generated from its text with numbers stripped out, so Wait 9m 45s and Wait 3m 20s share one key and one rule
  • Keeps the numbers — values removed to build the key come back as {0}, {1}, {2}
  • Reroute anywhere — chat, action bar, title, subtitle, or delete
  • Exact action bar timing — hold a message for precisely as long as you want, in ticks
  • Match by key or by text — text matching searches the raw component JSON, so vanilla translation keys like block.minecraft.set_spawn work directly
  • Stays out of the way — action bar output from other plugins is ignored by default, and messages already cancelled by another plugin are left alone
  • Clean unload — the packet listener is properly unregistered on disable, so hot-swapping with PlugMan doesn't leak listeners

Requirements

  • Paper or Spigot 1.20.5+
  • PacketEvents
  • Java 21 or newer (26.1+ servers already require Java 25)
  • Folia is not supported

Installation

  1. Install PacketEvents
  2. Drop MessageStyler.jar into /plugins
  3. Restart the server

No rules are active on a fresh install, so nothing changes until you configure it.

Finding a message

  1. Set debug: true in config.yml and run /messagestyler reload
  2. Trigger the message in game
  3. The console prints a line like:
[7c0efe5f] "You need to wait #m #s."  args=[9, 45]  (no rule)
  1. Use that key in a rule
  2. Set debug: false when you're done

Example

rules:
  sleep-wait:
    key: '7c0efe5f'
    replace: '&7Wait &f{0}m &f{1}s &7before sleeping.'
    to: actionbar
    duration: 60

Rule options

Option Description
match Text that must appear in the message. Both the visible text and the raw JSON are searched.
key 8-character ID from debug output. Takes priority over match if both are set.
replace New text. Supports & colour codes and &x&R&R&G&G&B&B hex. Omit to keep the original wording. Set to none to delete.
to chat, actionbar, title, subtitle or none
cancel true deletes the message
fade-in / stay / fade-out Title timing in ticks for this rule
duration Action bar hold time in ticks (20 = 1 second)

Rules are checked in file order and the first match wins. Rules using title or subtitle must also set replace, since titles are sent as new packets rather than modified in place.

Global settings

Setting Default Description
inspect-action-bar false Allow rules to match action bar messages
debug false Print the key and normalised text of every message
debug-once true Log each distinct message only once
debug-ignore [] Keys or text to exclude from debug logging
title-times 10 / 40 / 10 Default title fade-in, stay and fade-out in ticks

Commands and permissions

/messagestyler reload (alias /mstyler) messagestyler.reload — default op

How it works

MessageStyler registers a PacketEvents listener on SYSTEM_CHAT_MESSAGE at NORMAL priority, so plugins listening at MONITOR still observe the final text.

Message keys are generated by extracting every text and translate value from the component JSON, stripping colour codes, collapsing whitespace, replacing digit runs with #, and taking the first four bytes of the SHA-256 digest as hex. The removed digits are kept in order and exposed as {0}, {1} and so on.

Only plain JSON strings are touched — no Adventure classes are referenced anywhere, which is what keeps the plugin portable across server versions.

Building

mvn clean package

The jar is written to target/MessageStyler-1.0.0.jar.

Support

Bug reports and feature requests: open an issue

Links

About

Rewrite, restyle or reroute any message your Minecraft server sends.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Contributors

Languages