Skip to content

Harden placeholder and scoreboard rendering - #74

Merged
remdui merged 8 commits into
mainfrom
fix/placeholder-resilience
Jul 27, 2026
Merged

Harden placeholder and scoreboard rendering#74
remdui merged 8 commits into
mainfrom
fix/placeholder-resilience

Conversation

@remdui

@remdui remdui commented Jul 27, 2026

Copy link
Copy Markdown
Member

What changed

  • contain RuntimeException and binary-incompatibility LinkageError failures from PlaceholderAPI expansions
  • preserve the original unresolved message when an expansion fails or returns null
  • rate-limit diagnostics strictly by player, expansion set, and message fingerprint
  • detect unavailable Vault economy services before resolving %vault_eco_*% placeholders
  • temporarily mask unavailable economy placeholders so unrelated placeholders in the same message can still resolve
  • validate that the registered Vault provider, service owner, and providing plugin are enabled
  • render scoreboard title and each line independently so one broken line does not discard the others
  • isolate scoreboard updates and removals per player during joins, startup, scheduled refreshes, and shutdown
  • update the scoreboard cache only after a successful sidebar write, and include title changes in cache comparisons
  • discard per-player warning/cache state on quit

Root cause

PlaceholderAPI was called without an exception boundary. A disabled or binary-incompatible economy expansion could therefore escape through localization rendering into PlayerJoinEvent and the repeating scoreboard task. The task then failed every refresh interval, producing repeated stack traces and preventing scoreboard updates.

Behaviour after this change

Broken expansions no longer escape into Bukkit lifecycle events or scheduler tasks. Their placeholders remain visibly unresolved rather than crashing the message. When Vault has no usable economy provider, only Vault economy placeholders are held back; unrelated placeholders continue to resolve. A failure for one scoreboard line or one player does not stop remaining lines or players.

Tests

Added regression coverage for:

  • disabled PlaceholderAPI behaviour
  • runtime and linkage expansion failures
  • unresolved-message preservation
  • strict warning windows
  • Vault economy masking and restoration
  • normal Vault resolution when a provider is available
  • per-player scoreboard continuation after runtime and linkage failures

CI runs the complete Maven verification and bundled Paper acceptance suites for the published branch.

@remdui
remdui marked this pull request as ready for review July 27, 2026 23:04
@remdui
remdui merged commit 7ed9d5a into main Jul 27, 2026
7 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