Skip to content

Conversation

@1robie
Copy link
Contributor

@1robie 1robie commented Dec 1, 2025

This pull request introduces several type-safety improvements to the mechanics system, adds a new event for item loading, and enhances error logging throughout the codebase. Additionally, it improves configuration handling for time values and refines Dialogs support based on configuration. Below are the most important changes:

Mechanics System Type-Safety Improvements

  • Refactored Mechanic and MechanicFactory to use generics, ensuring type safety when handling mechanics and their factories. This includes updating relevant method signatures and internal maps to use parameterized types.

Event System Enhancements

  • Added a new event class ZMenuItemsLoad that is fired after custom items and their mechanics are loaded or reloaded, providing listeners with the loaded item IDs and reload status.

Error Logging Improvements

  • Replaced direct System.err.println calls with structured logging using the Logger class for better error reporting in placeholder handling and parsing.

Configuration and Data Handling

  • Changed the type of the seconds field in ActionPlayerData and related loaders from long to String, allowing for more flexible configuration (such as supporting expressions or different formats).

Dialogs and Command Registration

  • Dialogs support and related commands are now only enabled if the enableMiniMessageFormat configuration is true, with clear logging to inform users of the requirement.

Let me know if you have questions about any of these changes or need more details on a specific part!

@Maxlego08 Maxlego08 merged commit 5b2a5d4 into Maxlego08:develop Dec 16, 2025
2 checks passed
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.

2 participants