Skip to content

Latest commit

 

History

42 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SyncDeathMessages

A Minecraft plugin that broadcasts death and join/quit messages across multiple servers using Redis Pub/Sub. Runs on Bukkit/Spigot/Paper/Folia.

Why Redis

Redis Pub/Sub lets any server publish a message to a channel that every other server listens on. This works no matter how your network is structured, without needing proxy-side plugin messaging.

Features

  • Cross-server broadcasts — A death on one server shows up on every server in the same cluster.
  • Join/quit messages — Broadcast across the whole cluster. A player switching between servers in the same cluster produces no join/quit message at all.
  • MiniMessage support — Messages can use MiniMessage tags or legacy & color codes.
  • Folia support — Built on FoliaLib, works on Folia and regular Bukkit/Spigot/Paper.
  • Client locale item names — Weapon and mob names are sent as translatable keys, so each player sees them in their own language.
  • Item hover — Weapon names show the item lore on hover.
  • Self-healing Redis connection — The subscriber reconnects automatically and a watchdog detects half-open connections.

Installation

  1. Download the SyncDeathMessages jar.
  2. Put it in the plugins folder of each server you want to sync.
  3. Restart the servers.
  4. Set the Redis host/port/password in config.yml and restart again.

Configuration

Settings live in config.yml; all messages live in messages.yml. Missing keys are filled in from the defaults on startup.

# config.yml
redis:
  host: localhost
  port: 6379
  password: ""

# Servers sharing the same cluster id share death and join/quit messages.
cluster-id: default

# Broadcast join/quit messages across the whole cluster.
enable-join-quit: true

Redis settings and the cluster id are read at startup and require a server restart to change.

The vanilla death and join/quit messages are cancelled on every server and replaced by the synced announcements.

Messages use MiniMessage tags (<red>, <yellow>, <gradient:#ff0000:#0000ff>, ...) or legacy codes (&c, &e, ...). Each entry is a list; one message is picked at random, and an empty list disables that message. Available placeholders:

Placeholder Description
{player} Name of the player who died / joined / left
{killer} Name of the killer (player kill only)
{weapon} Weapon used by the killer, shows item lore on hover
{mob} Mob that killed the player
# messages.yml
PLAYER_KILL:
  default:
    - "<red>{player} <yellow>was killed by <green>{killer} <reset>😵"
  with_weapon:
    - "<red>{player} <yellow>was killed by <green>{killer} <yellow>using <white>{weapon} <reset>🔪"
ENTITY_ATTACK:
  default:
    - "<red>{player} <yellow>was killed by <aqua>{mob} <reset>💀"
PLAYER_JOIN:
  default:
    - "<gray>{player}</gray> <yellow>joined the server!"
PLAYER_QUIT:
  default:
    - "<gray>{player}</gray> <yellow>left the server!"

The default messages use emoji that need a resource pack to render in chat. If you want to use them, download the pack from the resourcepack folder and install it on the client. The icons map to the emoji in the default config.

Commands

Command Description
/sdmreload Reload config.yml and messages.yml (Redis settings need a restart)

Requires the syncdeathmessages.admin permission, which defaults to op.

Build

mvn package

About

A Minecraft plugin that synchronizes death messages across multiple servers using Redis, providing seamless cross-server announcements with zero impact on server performance.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages