Skip to content

Conversation

@imDMK
Copy link
Owner

@imDMK imDMK commented Dec 6, 2025

Description

This PR delivers a complete overhaul of the AutoMessage project, introducing a modernized architecture, improved performance, a cleaner configuration system, a robust scheduling layer, and an extensible messaging pipeline.

The refactor significantly elevates code quality, modularity, and maintainability, aligning the project with production-grade standards and common enterprise patterns.

Fixes: #75, #78, #85

Have the changes been tested?

  • Yes
  • No

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @imDMK, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request represents a comprehensive overhaul of the AutoMessage project, focusing on modernizing its architecture, improving performance, and enhancing overall code quality. The changes introduce a modular project structure, a more robust configuration system, a flexible messaging pipeline, and a redesigned scheduled message dispatching mechanism. The goal is to align the project with production-grade standards and enterprise patterns, making it more maintainable and extensible for future development.

Highlights

  • Project Structure Overhaul: The project has been refactored into a multi-module Gradle setup using Kotlin DSL, separating core logic (automessage-core) from the Bukkit plugin implementation (automessage-plugin). This enhances modularity and maintainability.
  • Modernized Configuration System: The configuration system has been completely rewritten using Okaeri Configs, introducing a robust ConfigManager and ConfigSection abstraction. This includes custom YAML serialization for various data types, ensuring a cleaner and more extensible configuration experience.
  • Enhanced Messaging Pipeline: A new MessageService leverages EternalCode Multification and Kyori Adventure for advanced message handling. This includes rich text formatting with MiniMessage, comprehensive placeholder support, and standardized message configurations for commands and dispatcher events.
  • Robust Scheduled Message Dispatching: The automatic message dispatching mechanism has been redesigned. It now features ScheduledMessage records with flexible AudienceRules (permission, group-based filtering) and supports various Notice types (chat, title, actionbar, bossbar, sound). Messages can be selected using either random or sequential strategies via the MessageSelector interface.
  • Streamlined Command Handling: Command processing has been migrated to LiteCommands, integrating custom handlers for invalid usage, missing permissions, and direct Notice results. New commands (/automessage enable, /automessage disable, /automessage reload) provide granular control over the message dispatcher and configuration.
  • Abstracted Scheduling and Logging: New TaskScheduler and PluginLogger abstractions have been introduced, with Bukkit-specific implementations (BukkitTaskScheduler, BukkitPluginLogger). This provides a consistent API for scheduling tasks (using java.time.Duration) and logging, decoupled from the underlying platform specifics.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This is an impressive and comprehensive overhaul of the project. The migration to a multi-module structure (core and plugin) with Gradle's Kotlin DSL is a significant step forward for maintainability and scalability. The new architecture clearly separates concerns, with dedicated packages for configuration, scheduling, commands, and platform-specific code. The use of modern Java features like records and sealed interfaces, along with a consistent validation strategy, greatly improves code quality and readability.

My review focuses on a few areas to further enhance correctness and robustness, such as ensuring configuration changes are persisted immediately and improving exception logging. Overall, this is an excellent refactoring that brings the project to a production-grade standard.

imDMK and others added 8 commits December 6, 2025 16:09
…heduled/dispatcher/MessageDispatcherConfig.java

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…heduled/ScheduledMessageConfig.java

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…mmand/dispatcher/EnableCommand.java

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…atform/logger/BukkitPluginLogger.java

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…atform/logger/BukkitPluginLogger.java

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…mmand/dispatcher/DisableCommand.java

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@imDMK imDMK changed the title Complete project overhaul — Architecture, Performance, Scheduling, Messaging, Configuration GH-87 Complete project overhaul — Architecture, Performance, Scheduling, Messaging, Configuration Dec 7, 2025
@imDMK imDMK merged commit 36abeeb into main Dec 7, 2025
5 checks passed
@imDMK imDMK deleted the feature/project-overhaul- branch December 7, 2025 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Notion order bug and automatic notice text fixed output bug

2 participants