Add Minecraft 1.8.8–1.20.6 legacy compatibility - #4
Conversation
## Summary Adds separate modern and legacy HeadDB 6.0.3 artifacts: - `HeadDB-6.0.3.jar` for Paper 1.21+ - `HeadDB-6.0.3-legacy.jar` for Bukkit-compatible servers from 1.8.8 through 1.20.6 ## Legacy support The new `headdb-legacy` module provides: - Browsing, category, search, favorites, local-head, custom-category, and purchase menus - Persistent player settings and favorites using the existing SQLite schema - Migration from the pre-v6 player database - Vault economy integration and configurable pricing - Legacy and modern textured-skull profile handling - Structured search filters - `/hdb info`, `/hdb search`, `/hdb give`, `/hdb open`, and `/hdb sounds` - Public and deprecated API service compatibility - Configurable messages, sounds, and permissions - Metrics and update notifications - Scheduled database refreshes, preload support, and fallback database sources Legacy menus use Bukkit inventories. Purchase quantities use inventory presets, and unsupported MiniMessage effects are simplified on older clients. ## Build and release changes - Adds `headdb-legacy` as a Maven module - Targets Java 8 bytecode for the legacy jar - Targets Java 21 for the modern jar - Compiles the modern plugin against Paper 1.21 - Removes the previous `-Spigot.jar` classifier - Updates the release workflow to upload both jars - Adds API compatibility and runtime smoke-test tooling - Updates installation documentation and the 6.0.3 changelog ## Validation - Full Maven reactor build passed - 55 automated tests passed - Legacy API compilation passed against: - 1.8.8 - 1.13.2 - 1.16.5 - 1.18.2 - 1.20.6 - Java bytecode audit passed: - Legacy: Java 8 compatible - Modern: Java 21 compatible - Runtime smoke tests passed on all 39 historical Paper releases published between 1.8.8 and 1.20.6 - Every runtime test: - Reached server-ready state - Enabled HeadDB successfully - Loaded all 86,248 heads - Reported no HeadDB startup errors ## Compatibility | Artifact | Minecraft versions | Runtime | |---|---|---| | `HeadDB-6.0.3.jar` | Paper 1.21+ | Java 21+ | | `HeadDB-6.0.3-legacy.jar` | Bukkit-compatible 1.8.8–1.20.6 | Java version required by the server | Only one HeadDB artifact should be installed on a server.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 36bcb14913
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| private boolean allowed(Player player, String category) { | ||
| return player.hasPermission("headdb.category.*") | ||
| || player.hasPermission("headdb.category." + normalize(category)); |
There was a problem hiding this comment.
Honor explicit category denials before wildcard grants
When a permission manager grants headdb.category.* but explicitly denies a specific node such as headdb.category.local, allowed returns true solely because of the wildcard. This bypasses the documented category-specific override and lets the player open denied menus; the equivalent wildcard-first checks in the main menu and search filtering have the same problem. Check whether the category-specific permission is explicitly set before falling back to the wildcard.
Useful? React with 👍 / 👎.
| main: com.bitworksmc.headdb.legacy.LegacyHeadDB | ||
| version: ${project.version} |
There was a problem hiding this comment.
Declare Vault as a soft dependency
When economy.provider is configured as VAULT but HeadDB is enabled before Vault, the one-time provider lookup returns null and economy support remains disabled for the entire session. Players can then take heads directly without being charged. Add Vault to softdepend so its service is registered before LegacyEconomy is constructed.
Useful? React with 👍 / 👎.
| headdb.category.favorites: | ||
| default: op |
There was a problem hiding this comment.
Preserve the legacy favorites permission alias
Existing installations that grant only the documented legacy node headdb.favorites lose access to favorites with this artifact because the legacy descriptor declares only headdb.category.favorites, and the legacy permission check does not recognize the alias. Declare headdb.favorites with the new node as a child, as the modern descriptor does.
Useful? React with 👍 / 👎.
Summary
Adds separate modern and legacy HeadDB 6.0.3 artifacts:
HeadDB-6.0.3.jarfor Paper 1.21+HeadDB-6.0.3-legacy.jarfor Bukkit-compatible servers from 1.8.8 through 1.20.6Legacy support
The new
headdb-legacymodule provides:/hdb info,/hdb search,/hdb give,/hdb open, and/hdb soundsLegacy menus use Bukkit inventories. Purchase quantities use inventory presets, and unsupported MiniMessage effects are simplified on older clients.
Build and release changes
headdb-legacyas a Maven module-Spigot.jarclassifierValidation
Compatibility
HeadDB-6.0.3.jarHeadDB-6.0.3-legacy.jarOnly one HeadDB artifact should be installed on a server.