Advancement Announcer v1.6.0
This is a major update focused on new features, modernizing the plugin's core, and a complete visual overhaul of the GUI.
New Features
- Custom Model Data (CMD) Support: The plugin's core feature! Announcements can now display items with Custom Model Data.
- Supports direct integers (e.g., 12345).
- Supports strings from other plugins like itemsadder:my_item and nexo:my_item.
- Uses UltimateAdvancementAPI when available, with a fallback to the legacy method.
- Full Hex Color Support: The plugin now fully supports &#RRGGBB hex color codes in all config messages, GUI elements, and announcements. This is powered by the Kyori Adventure library.
- Custom Sound System: You can now add a custom sound: "..." to any announcement.
- Supports all default Bukkit sounds (e.g., ENTITY_PLAYER_LEVELUP) and custom sounds from resource packs (e.g., my.custom.sound).
- Added a new "Set Sound" GUI (SoundSelectionGUI) with a right-click-to-preview feature.
- Advanced Player Toggles: The /aa toggle command has been upgraded. Players can now independently mute announcements or just their sounds:
- /aa toggle announcements
- /aa toggle sounds
- New Permissions: Added child permissions advancementannouncer.toggle.announcements and advancementannouncer.toggle.sounds for finer control.
Improvements & GUI Overhaul
- Complete GUI Overhaul:
- All GUI menus now have a "filler glass" (GRAY_STAINED_GLASS_PANE) background for a modern, professional look.
- The EditorGUI layout has been rearranged from a vertical list into a clean 3x2 grid.
- All item descriptions (lores) in list menus (Presets, AutoAnnounce, etc.) have been re-formatted with colors (e.g., ยป Style: ...) for better readability.
- Config Cleanup:
- Removed static GUI titles (like edit-gui-title) from config.yml to make them hard-coded, simplifying the config.
- All hard-coded messages (like "no permission") are now properly read from lang-messages.yml.
- Cleaned up config.yml header comments for better clarity.
Fixes & Performance
- Fixed Spigot Crash: Removed the mojang-mapped classifier from the UAPI dependency, resolving the critical NoClassDefFoundError crash on Spigot servers. The plugin now works correctly on both Spigot and Paper.
- Fixed Sound Logic: The playSound handler now intelligently checks for Bukkit enums (like ENTITY_EXPERIENCE_ORB_PICKUP) and custom strings (my.sound) to ensure all sounds play correctly.
- Fixed Auto-Announce: The ORDERED and RANDOM modes now correctly use the failedAttempts counter, preventing potential infinite error loops.
- Performance: Optimized TextUtil's hex conversion by making the Regex pattern static final.
- Stability: Hardened PlayerData, UpdateChecker, and GUIs against potential NullPointerException and IndexOutOfBoundsException errors based on external feedback.
- Build: Fixed pom.xml license file packaging to correctly include both the plugin's MIT License and UAPI's LGPL requirements.