A plugin to send MiniMessage formatted rotating messages in chat on a scheduled interval.
A plugin to send
MiniMessage formatted
rotating messages in chat on a scheduled interval.
duration: integer300 (5 minutes)message-format: string<gray>[<red>+</red>]</gray> %message% (renders to [+] %message%)debug-logging: booleanfalse/messenger <add|reload>/messenger add - Open an editor to add a new rotating message to/messenger add <message> - Add a message into the chat directly/messenger reload - Reload the plugin's configuration andmessages.json file.messenger.command.messenger/messenger commandopThe plugin currently only handles two files: config.yml andmessages.json.
The config.yml holds the configuration for the plugin, see
Configuration for more details
The messages.json holds each message to be printed into chat.
Removing/Adding a message from this list will remove/add it from/to the
game (After /messenger reload or server restart).
A message can be formatted using
MiniMessage. If%player% is included in the message, it will be replaced with the
player's username.
The plugin offers a simple API which allows for adding new messages.
To add it as a dependency if using maven, add the following to your pom.xml:
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
<dependency>
<groupId>com.github.funnyboy-roks</groupId>
<artifactId>Messenger</artifactId>
<version>Tag</version>
</dependency>
Otherwise, checkout the jitpack repo for other systems
// construct a new message that says "hello " + playername
// and is sent to all players
Message msg = new Message(
p -> Component.text("hello ").append(p.displayName()),
p -> true
);
// Add a message to the list
Messenger.api().addMessage(msg);
I'm always looking for ideas, if you have any, please create an issue
and let me know!