Bug Fixes and Improvements
Added config validation on load/reload The plugin now validates interval message entries and join messages on startup and reload, logging warnings for missing or invalid fields (e.g., missing message text, invalid intervals, empty lists).
Fixed config defaults and color code support Ensured default config values are properly saved and color codes (&) are supported and translated when sending messages.
Random order support for interval messages Implemented the settings.random-order config option to shuffle interval messages per interval group, honoring the original intent.
Grouped messages by interval and scheduled efficiently Messages are grouped by their interval value, and a single repeating task per interval broadcasts messages in sequence, improving performance and organization.
Permission and per-world support for interval messages Each interval message can specify an optional permission and a list of worlds. Messages are only sent to players who have the required permission and are in the specified worlds. If no permission or worlds are specified, the message is broadcast to all players for performance.
Improved error handling and logging Invalid interval message entries are skipped with detailed warnings logged, including the entry index and error cause.
Message sent count tracking (debug mode) Each interval message tracks how many times it has been sent. When settings.debug-logging is enabled, detailed logs are printed for each message broadcast or sent.
Optimized message sending For messages without permission or world restrictions, Bukkit.broadcastMessage() is used instead of iterating over all players, improving performance on large servers.
Per-world join messages Added support for per-world join messages under messages.join-per-world section. Join messages can be configured to only appear in specific worlds.
Random order for join messages Join messages are shuffled if settings.random-order is enabled, providing variety on player join.
Join message filtering by world Only join messages applicable to the player’s current world are sent.
Warning if join messages list is empty Logs a warning if no join messages are configured, helping server admins identify config issues.
%player% — Player’s name (or "Player" if no player context) %online% — Number of online players %server% — Server name %time% — Current server time in HH:mm:ss format Placeholder replacement per player Placeholders are replaced individually for each player when permissions or world restrictions apply.
/automessages reload — Reloads the config and reschedules messages /automessages toggle — Enables or disables automated messages without editing the config file Permission checks for commands Added permissions automessages.reload and automessages.toggle to restrict command usage.
Permission checks for interval messages Interval messages can specify a permission field to restrict which players receive them.
Permission checks for command usage Added automessages.use permission to gate access to the /automessages command.
Tab completion support Added tab completion for /automessages subcommands (reload, toggle).
Improved task management All scheduled tasks are tracked and properly cancelled on plugin disable or config reload to prevent memory leaks or duplicate tasks.
Detailed logging Added debug logging option to help server admins troubleshoot message sending and scheduling.
Code cleanup and comments Improved code readability with comments and better variable naming.

AutoMessages999 is a powerful and fully customizable Bukkit plugin that automatically sends dynamic, placeholder-rich messages to players at configurable intervals and when they join the server.