This changelog documents the security fixes, performance enhancements, and custom permission alignment upgrades implemented in this session:
Optimization & Performance
- Spatial Chunk Indexing (O(1) Lookup): Replaced slow, linear O(N) claim-search iteration on player movements and block placements with a fast chunk-based map lookup.
- Folder-Based Data Storage: Transitioned claims storage from a single monolithic claims.yml file to individual files under claims/ and player profiles under players/. Built-in migration automatically splits legacy claims into the new structure on startup.
️ Security & Bug Fixes
- GUI Drag-and-Drop Exploit Fix: Blocked inventory drag gestures and clicked-inventory interactions in the player's bottom inventory to stop players from dragging GUI items into their own inventories.
- Anchor Block Protection: For block-placed claims, breaking the center anchor block (the physical claim block) now checks if the breaker is the owner or an admin. Non-owners are blocked, and successful breaks delete the claim and drop the matching claim block item.
- Explosion & Fire Shields: Explosion handlers now scan individual blocks in explosion block lists to shield protected claim zones. Fire spreads and ignites respect claim firespread flags.
- Thread-Safety fixes: Wrapped AsyncPlayerChatEvent callbacks in synchronous scheduler tasks to safely perform GUI updates on the main server thread.
- Console Safety: Fixed potential NullPointerExceptions when execution of commands (like /claim admin reload or the help menu) occurred on the console without a player context.
✨ Custom Permissions & Ownership
- Aligned Custom Permissions Mapping: Configured custom permission nodes (fabulousclaims.vip, fabulousclaims.elite) directly to max-claims limits and allowed-blocks whitelist arrays. Multiple node limits are resolved dynamically using the highest claim count and the union of allowed claim blocks.
- Added /claim transferOwnership <player>: Regular players can now safely transfer ownership of claims they own to other online players (respecting the recipient's maximum claims limit).
- Consolidated Presets: Unified all size presets, material types, custom item display names, and lore descriptions into the claim-types section inside config.yml.