Skip to content

Add baltop GUI, use snapshot leaderboard.#106

Open
vLuckyyy wants to merge 3 commits intomasterfrom
add-baltop-gui
Open

Add baltop GUI, use snapshot leaderboard.#106
vLuckyyy wants to merge 3 commits intomasterfrom
add-baltop-gui

Conversation

@vLuckyyy
Copy link
Member

No description provided.

@vLuckyyy vLuckyyy requested a review from a team as a code owner January 21, 2026 20:06
Copy link

@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 pull request introduces several enhancements and new features to the EternalEconomy plugin. It updates dependency versions in Versions.kt, including adding TRIUMPH_GUI and LITE_SKULL_API while removing ADVENTURE_PLATFORM_BUKKIT and ADVENTURE_API. The core plugin now includes TriumphGUI for GUI and LiteSkullAPI, along with an AdminGenerateCommand for generating accounts. A MiniMessageHolder interface was created, and the AccountRepositoryImpl was refactored to use AccountTable and create a composite index for leaderboard queries. The plugin configuration was updated with new settings for leaderboard GUI, and a LeaderboardConfigurer was added to manage leaderboard commands and GUI. The review comments suggest clarifying the removal of Adventure dependencies, commend the detailed comment for createIndexes(), suggest a non-blocking delay mechanism for the account generation command, recommend using page.totalCount() for accurate player count, and propose moving the RESET_ITEM component to MiniMessageHolder for reusability.

Comment on lines 13 to -14
const val JETBRAINS_ANNOTATIONS = "26.0.2-1"

const val ADVENTURE_PLATFORM_BUKKIT = "4.4.1"
const val ADVENTURE_API = "4.24.0"

Choose a reason for hiding this comment

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

medium

The removal of ADVENTURE_PLATFORM_BUKKIT and ADVENTURE_API is noted. Could you please clarify if their functionality is now entirely covered by eternalcode-commons-adventure or if there's another reason for their removal? This helps in understanding the dependency graph and potential impacts.

try {
TableUtils.createTableIfNotExists(databaseManager.connectionSource(), AccountWrapper.class);
TableUtils.createTableIfNotExists(databaseManager.connectionSource(), AccountTable.class);
this.createIndexes();

Choose a reason for hiding this comment

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

medium

The comment for createIndexes() is very detailed and provides excellent context for why this custom index is necessary. This is a great example of clear documentation for a performance-critical change.

Comment on lines +97 to +99
int players = page.maxPages() <= 1
? page.entries().size()
: (page.maxPages() - 1) * pageSize + page.entries().size();

Choose a reason for hiding this comment

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

medium

The calculation for players here might not always accurately reflect the total number of players, especially if the last page is not full or if the totalCount from the snapshot is directly available. It would be more accurate and robust to use page.totalCount() directly, which is already part of the LeaderboardPage record, to represent the total number of players in the leaderboard.

        int players = (int) page.totalCount();

Comment on lines +21 to +24
@Exclude
private static final Component RESET_ITEM = Component.text()
.decoration(TextDecoration.ITALIC, false)
.build();

Choose a reason for hiding this comment

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

medium

The RESET_ITEM component is a useful utility for removing default italics. To avoid duplication and promote reusability, consider moving this static final field to the MiniMessageHolder interface or a dedicated utility class. This would centralize its definition and make it accessible across all classes that implement MiniMessageHolder.

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.

1 participant