Skip to content

Feat/ezcountdown config#114

Merged
ez-plugins merged 4 commits into
v3.xfrom
feat/ezcountdown-config
May 24, 2026
Merged

Feat/ezcountdown config#114
ez-plugins merged 4 commits into
v3.xfrom
feat/ezcountdown-config

Conversation

@ez-plugins
Copy link
Copy Markdown
Owner

  • EzCountdown integration (optional soft-dependency):
    • RTP countdown display can now be delegated to EzCountdown for richer, configurable display channels.
    • Configurable display types per RTP world: ACTION_BAR, BOSS_BAR, TITLE, CHAT, SCOREBOARD, DIALOG.
    • Configurable MiniMessage format string with {formatted} placeholder for remaining time.
    • Each teleporting player receives an ephemeral, per-player countdown with permission-scoped visibility.
    • Falls back to the built-in bossbar/chat countdown automatically when EzCountdown is absent or ezcountdown.enabled: false.
    • New countdown.ezcountdown.* config section in rtp.yml (disabled by default).
  • EzCountdown added as optional soft-dependency in plugin.yml.
  • Factions RTP (TeamsAPI):
    • Added /rtp faction to open a claim-selection GUI from all TeamsAPI claims available to the player's team.
    • Added TeamsAPI subcommand integration for /f rtp via the TeamsAPI subcommand API (when provided by the installed TeamsAPI version).
    • Claim selection now sets the selected claim chunk as RTP center and then applies normal per-world RTP behavior/settings.
  • New faction-gui.yml file for full claim-GUI configuration.
  • Heatmap claim overlays (admin insight):
    • Added claim border overlay mode for /rtp heatmap and /rtp heatmap save via claims-overlay flag.
    • Added rtp.yml options under heatmap.claims-overlay.*:
      • enabled
      • style (border)
      • color
      • line-width
  • Claim-constrained fake RTP simulation:
    • Added /rtp fake <amount> claims [world] to generate simulated points on faction claims owned by the executor’s team.

Changed

  • TeamsAPI dependency bumped from 1.4.1 to 1.8.0.
  • TeamsAPI /f rtp subcommand integration rewritten: replaced the reflection-based Proxy approach with a proper AbstractTeamsSubcommand subclass (requires TeamsAPI ≥ 1.8.0).
  • TeamsAPI subcommand registration now uses an explicit isPluginEnabled("TeamsAPI") guard instead of relying on NoClassDefFoundError suppression.
  • Faction claim GUI icons now attempt to use player skulls when claimant/owner identity is available, with configurable fallback material when unavailable.
  • Added configurable title, size, claim item format/lore, skull toggle, and navigation slot/name settings for faction GUI pages.
  • Update checker refactored to use mc-plugin-update-notifier with Modrinth as primary source and GitHub Releases as fallback source.

Fixed

  • Heatmap enablement now resolves correctly for inherited/fallback world settings (heatmap.enabled) and no longer reads as disabled unexpectedly in world/GUI override paths.
  • /rtp heatmap no longer hard-requires biome cache for non-biome heatmaps. Biome cache is only required for biome-filtered heatmap requests.
  • Spigot startup compatibility fixed in update checking (JavaPlugin#getDescription().getVersion() used instead of Paper-only metadata calls).
  • Message loading now supports both top-level keys and nested messages.* language-file layouts.
  • Language file handling is now non-destructive: startup repair only targets clearly corrupted message files, with automatic backfill of missing message keys while preserving existing translations/customizations.

- 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.
@ez-plugins ez-plugins merged commit 07194d1 into v3.x May 24, 2026
12 checks passed
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