Skip to content

fix(misc): harden guild damage, config parsing, and claims - #769

Merged
darbyjack merged 1 commit into
masterfrom
fix/qol-fixes-and-improvements
Jun 26, 2026
Merged

fix(misc): harden guild damage, config parsing, and claims#769
darbyjack merged 1 commit into
masterfrom
fix/qol-fixes-and-improvements

Conversation

@darbyjack

Copy link
Copy Markdown
Member

This pull request introduces several improvements and bug fixes around plugin integration, configuration validation, and error handling. The main themes are safer and more robust integration with WorldGuard, improved validation and error reporting for configuration-driven features (such as guild buffs and ticket items), and general code quality improvements.

WorldGuard Integration Improvements:

  • WorldGuard-backed listeners (WorldGuardListener, ClaimSignListener) are now only registered if WorldGuard is present and its wrapper can be initialized, preventing startup errors when WorldGuard is missing or misconfigured. (Guilds.java, ClaimSignListener.java, WorldGuardListener.kt) [1] [2] [3]
  • The WorldGuardWrapper instance is now injected into listeners rather than being statically fetched, improving testability and reliability. (ClaimSignListener.java, WorldGuardListener.kt) [1] [2]

Configuration Validation and Error Handling:

  • Added robust parsing and validation for claim sign prices, with user feedback on invalid input and prevention of exploits via negative or malformed values. (ClaimSignListener.java) [1] [2] [3]
  • Guild buff effects are now validated when parsed, with warnings logged for invalid effect types, amplifiers, or durations, and such entries are skipped instead of causing errors. (BuffGUI.kt)
  • Ticket material resolution now uses XMaterial for cross-version compatibility, and falls back to PAPER with a warning if the configured material is invalid. (GuildHandler.java) [1] [2]

Code Quality and Maintenance:

  • Removed the unused addPotion method from Guild.java and unnecessary imports, cleaning up dead code. (Guild.java) [1] [2]
  • Improved mob event handling by ensuring only monsters are affected in EntityListener. (EntityListener.java) [1] [2]

These changes collectively make the plugin more robust against misconfiguration, improve cross-version compatibility, and provide clearer error messages for both administrators and users.

@darbyjack
darbyjack merged commit 58a18ad into master Jun 26, 2026
1 check passed
@darbyjack
darbyjack deleted the fix/qol-fixes-and-improvements branch July 12, 2026 02:22
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