Skip to content

Conversation

@bentahsin
Copy link
Owner

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances the ConfigMapper with a new resetToDefaults method and improves validation throughout the configuration system. Key improvements include better type safety in converters, enhanced enum handling with case-insensitive matching, and support for additional ItemStack metadata types (leather armor colors, skull owners, potions).

  • Added resetToDefaults() method to ConfigMapper for resetting config instances to default values
  • Improved validation and type conversion throughout list and map handling with safer casting
  • Enhanced converter implementations with better null handling and support for decimal time values

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
ConfigMapper.java Added resetToDefaults method, refactored validation into isValid helper, improved enum/primitive conversion with case-insensitive matching and Character support
Configuration.java Integrated resetToDefaults call during config initialization
Cuboid.java Removed automatic coordinate normalization from constructors, added null check for getCenter(), exposed getters for all fields
TimeConverter.java Added support for decimal time values (e.g., "1.5h"), removed comments
LocationConverter.java Enhanced null safety with world validation and warning messages
ItemStackConverter.java Improved type safety with instanceof checks, added support for leather armor colors, skull owners, and potion metadata

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bentahsin bentahsin merged commit f98535e into master Dec 2, 2025
1 check passed
@bentahsin bentahsin deleted the bugfix/general-bug-cleaning branch December 2, 2025 19:10
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