Feat/ezcountdown config#114
Merged
Merged
Conversation
…ate notifier refactor
- Add EzCountdown optional integration with configurable display types (ACTION_BAR, BOSS_BAR, TITLE, CHAT, SCOREBOARD, DIALOG) and MiniMessage format; falls back to built-in countdown when EzCountdown is absent - Add countdown.ezcountdown.* config section to rtp.yml (disabled by default) - Add EzCountdown to plugin.yml softdepend - Bump TeamsAPI dependency 1.4.1 → 1.8.0 - Rewrite TeamsAPI /f rtp subcommand with AbstractTeamsSubcommand (replaces reflection-based Proxy); add explicit isPluginEnabled guard - Bump version 3.3.1 → 3.4.0
Bukkit's event registration inspects all method descriptors (including private methods) in a Listener class via reflection. When TeamsAPI was absent at runtime, the JVM couldn't resolve TeamClaim/TeamsService types referenced in FactionClaimSelectionGuiManager's private methods and inner Session class, causing a NoClassDefFoundError during registerEvents(). Fix: - Extract ClaimSnapshot record (plain Java types only) as a DTO to carry claim data without any TeamsAPI imports in the Listener class. - Extract TeamsApiClaimFetcher class to hold all TeamsAPI type references; it is loaded lazily from method bodies, not at class-load time. - Refactor FactionClaimSelectionGuiManager to use ClaimSnapshot everywhere; zero TeamsAPI imports remain in the class structure. Tests: - Add mockito-extensions/org.mockito.plugins.MockMaker (mock-maker-inline) to ezrtp-bukkit so the final EzRtpPlugin class can be mocked. - Add SpigotStartupSmokeTest: scheduler (BUKKIT caps) + TeamsAPI-absent regression test. - Add PaperStartupSmokeTest: scheduler (PAPER caps) + TeamsAPI disabled and enabled-but-unavailable path tests.
…ture When TeamsAPI was absent, constructing TeamsApiSubcommandBridge threw NoClassDefFoundError for com/skyblockexp/teamsapi/api/TeamsSubcommand. The JVM's bytecode verifier resolved the checkcast instruction in unregister() at class-load time, before any runtime isPluginEnabled guard could fire. Fix: extract all TeamsAPI type references (registerSubcommand call, unregisterSubcommand call, TeamsSubcommand cast, RtpTeamsSubcommand construction) into a new TeamsApiSubcommandOps class. TeamsApiSubcommandBridge now has zero TeamsAPI imports and delegates from method bodies only, so TeamsApiSubcommandOps is loaded lazily after the isPluginEnabled guard. Regression test: teamsApiSubcommandBridge_register_withoutTeamsApi_doesNotThrow added to SpigotStartupSmokeTest.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ACTION_BAR,BOSS_BAR,TITLE,CHAT,SCOREBOARD,DIALOG.{formatted}placeholder for remaining time.ezcountdown.enabled: false.countdown.ezcountdown.*config section inrtp.yml(disabled by default).EzCountdownadded as optional soft-dependency inplugin.yml./rtp factionto open a claim-selection GUI from all TeamsAPI claims available to the player's team./f rtpvia the TeamsAPI subcommand API (when provided by the installed TeamsAPI version).faction-gui.ymlfile for full claim-GUI configuration./rtp heatmapand/rtp heatmap saveviaclaims-overlayflag.rtp.ymloptions underheatmap.claims-overlay.*:enabledstyle(border)colorline-width/rtp fake <amount> claims [world]to generate simulated points on faction claims owned by the executor’s team.Changed
1.4.1to1.8.0./f rtpsubcommand integration rewritten: replaced the reflection-basedProxyapproach with a properAbstractTeamsSubcommandsubclass (requires TeamsAPI ≥ 1.8.0).isPluginEnabled("TeamsAPI")guard instead of relying onNoClassDefFoundErrorsuppression.mc-plugin-update-notifierwith Modrinth as primary source and GitHub Releases as fallback source.Fixed
heatmap.enabled) and no longer reads as disabled unexpectedly in world/GUI override paths./rtp heatmapno longer hard-requires biome cache for non-biome heatmaps. Biome cache is only required for biome-filtered heatmap requests.JavaPlugin#getDescription().getVersion()used instead of Paper-only metadata calls).messages.*language-file layouts.