Simple Minecraft plugin for Paper/Spigot that sends automatic messages to the server chat or action bar
- All configuration is read from
config.yml - Chat or action bar: each message can be shown in chat (with prefix) or action bar (no prefix)
- Optional sound: each message can play a Minecraft sound when sent (or no sound if omitted or set to
none) - Configurable prefix for chat messages (
prefix) - Configurable interval in seconds (
interval) - skip-if-empty: optionally avoid sending broadcasts when there are 0 players online (
skip-if-empty) - Dynamic interval (custom-interval): broadcast interval can change based on online player count (threshold scaling)
- Sequential or random sending (
random-send) - Minecraft color codes supported using
&(chat and action bar) - Safe handling when the message list is empty
- reload command to reload configuration without restarting the server
- toggle command to pause or resume message broadcasting
- All plugin messages (reload, toggle, errors, usage) are configurable in
config.yml, including the plugin name prefix
| Command | Aliases | Description |
|---|---|---|
/simplebroadcast reload |
/sb reload |
Reloads the plugin configuration |
/simplebroadcast toggle |
/sb toggle |
Pauses or resumes automatic message broadcasting |
- reload: requires permission
sb.reload(default: op) - toggle: requires permission
sb.toggle(default: op) - Works in-game and from the server console
- Java 21 (LTS).
- Paper or Spigot server on the latest supported version (tested with
api-version: "1.21") - Maven 3.6+ to build the project
From the project root (simple-broadcast), run:
mvn clean packageThe plugin JAR will be generated at:
target/SimpleBroadcast-1.1.2.jar
- Copy the built JAR to your Paper/Spigot server
pluginsfolder - Start or restart the server
- The
config.ymlfile will be created automatically inplugins/SimpleBroadcast/if it does not exist
Example configuration (defaults):
check-updates: true
prefix: "&e[!] &r"
interval: 60
skip-if-empty: true
custom-interval:
enabled: false
rules:
- min-players: 10
interval: 3600
- min-players: 11
interval: 1800
- min-players: 16
interval: 60
random-send: false
messages:
- text: "&fThis is the &e&lfirst &fexample message"
display: chat
sound: "entity.experience_orb.pickup"
- text: "&e&lAction bar example message"
display: action-bar
sound: none
- text: "&fThis is the &e<hird &fexample message"
plugin-messages:
prefix: "&7[&6Broadcasts&7]"
toggle-paused: "&eMessage broadcasting paused"
toggle-resumed: "&aMessage broadcasting resumed"
toggle-no-permission: "&cYou do not have permission to run this command. (sb.toggle)"
reload-success: "&aConfiguration reloaded successfully"
reload-no-permission: "&cYou do not have permission to run this command. (sb.reload)"
usage: "&7Usage: &f/<command> <reload|toggle>"- check-updates: If
true, checks Modrinth for updates on startup and notifies console and operators - prefix: Prefix added at the start of each chat message (ignored for action bar)
- interval: Default interval in seconds between each message
- skip-if-empty: If
true, no broadcast is sent when there are 0 players online. When custom-interval is enabled, skip-if-empty is enforced unless you add a rule withmin-players: 0. - custom-interval: Dynamic interval based on online player count (threshold scaling). When
enabled: true, rules are sorted bymin-playersascending; the plugin uses the rule with the highestmin-playersthat is ≤ current player count. If no rule matches, the default interval is used. You can define any number of rules. Example: with 12 players online and rules 10→3600, 11→1800, 16→60, the interval used is 1800 (11 matches; 16 does not). If you add a rule withmin-players: 0, broadcasts can run with 0 players using that rule’s interval (skip-if-empty is not enforced). - random-send:
false= sequential;true= random, avoiding repeating the last message - messages: List of messages. Each has
text(required, supports&colors). Optional:display(chatoraction-bar, defaultchat);sound(Minecraft sound key, ornone/ omit for no sound). Action bar messages do not show the prefix. - plugin-messages: Messages shown for commands.
<command>inusageis replaced with the command used (/simplebroadcastor/sb)
- The plugin schedules a repeating task using Bukkit's scheduler
- On enable (
onEnable), it saves the default config, loads it, and starts the task - On disable (
onDisable), it cancels the task - Each run of the task:
- Reads the message list from the configuration
- If it is empty, it does nothing and returns silently
- Applies
&color codes viaChatColor.translateAlternateColorCodes - If display is chat: broadcasts to the whole server with the configured prefix
- If display is action-bar: sends to each online player's action bar (no prefix)
- If the message has a sound set (and not
none), plays that sound for all online players
