Repository navigation
Version 1.1.0
New Features and Improvements:
-
Custom Item Serialization and Deserialization:
- Implemented the
CustomItemclass to be fullyConfigurationSerializablewith proper serialization and deserialization methods. - Registered
CustomItemwith Bukkit'sConfigurationSerializationsystem to ensure correct handling of custom items in configuration files.
- Implemented the
-
Configuration Enhancements:
- Added a comprehensive configuration file (
config.yml) that includes settings for API credentials, GUI settings, and messages. - Defined a structured format for
gui-iconsin the configuration to allow for easy customization of GUI elements.
- Added a comprehensive configuration file (
-
GUI Icon Loading:
- Created a new method to read and deserialize all
gui-iconsfrom the configuration into aHashMap<String, ItemStack>. - Ensured that the method handles exceptions and logs errors gracefully if any issues occur during the loading process.
- Created a new method to read and deserialize all
-
Refactored Main Menu Creation:
- Improved the
MainMenuclass to use afor-eachloop for adding category buttons, enhancing readability and maintainability. - Defined specific slots for category buttons and ensured the GUI layout remains clean and organized.
- Added border buttons and a close button to enhance the user experience within the GUI.
- Improved the
-
Bug Fixes:
- Resolved an issue where
MemorySectioncould not be cast toCustomItem, ensuring proper deserialization of custom items from the configuration. - Fixed potential NPE (NullPointerException) cases by adding necessary null checks when accessing item metadata.
- Resolved an issue where
Detailed Changes:
-
CustomItem Class:
- Implemented
ConfigurationSerializableinterface. - Added proper serialization and deserialization methods.
- Example usage and configuration added to
config.yml.
- Implemented
-
Configuration Setup:
- Updated
config.ymlto include detailed sections forapi-credentials,settings,gui-icons, andmessages. - Added example entries for various GUI icons including border, back, close, category, and product items.
- Updated
-
GuiIconLoader Class:
- New class
GuiIconLoaderto handle loading and deserialization of GUI icons from the configuration. - Method
loadGuiIconsreadsgui-iconsfrom the config and populates aHashMap<String, ItemStack>.
- New class
-
MainMenu Class:
- Refactored to use a
for-eachloop for iterating over categories and setting up buttons in the GUI. - Improved logic for placing border and category buttons in the GUI layout.
- Ensured proper handling of player interactions with the GUI, including opening category lists and closing the inventory.
- Refactored to use a
-
Exception Handling:
- Added try-catch blocks to gracefully handle and log errors during the configuration reading and GUI setup processes.
How to Update:
- Pull the latest changes from the repository.
- Ensure your configuration file (
config.yml) is updated with the new structure and settings. - Restart your server to apply the changes and see the new features in action.
We hope these improvements enhance your experience with the NamelessMCStoreGUI plugin. If you encounter any issues or have suggestions for further improvements, please open an issue on GitHub. Thank you for using our plugin!