Skip to content

Conversation

Joltras
Copy link
Collaborator

@Joltras Joltras commented Jul 9, 2025

Proposed changes

While the original use of generics in the SetupData class was well-intentioned, the implementation introduced some drawbacks that made usage more difficult than usual. This pull request removes the use of generics from the SetupData interface and from all related classes. Since Java introduced smart casts, it is now easier to use them instead of generics for this purpose. Additionally, the service can now store different implementations within a single instance, eliminating the need for one instance per context.

Types of changes

What types of changes does your code introduce to this project?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of
them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before
merging your code.

  • I have read the CONTRIBUTING.md
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

@Joltras Joltras self-assigned this Jul 9, 2025
@Joltras Joltras added documentation Improvements or additions to documentation enhancement New feature or request labels Jul 9, 2025
@Joltras Joltras merged commit 5d443fd into develop Jul 9, 2025
7 checks passed
@Joltras Joltras deleted the feature/flattenStructure branch July 9, 2025 08:00
Joltras added a commit that referenced this pull request Jul 9, 2025
* Add license file

* Update license file

* Allow auto updates for patches

* Update dependency gradle to v8.14.1 (#12)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency gradle to v8.14.2 (#13)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Remove final usage to allow custom implementations of the given event classes

* Trigger Build

* Update dependency gradle to v8.14.3 (#14)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Add support for Minecrat 1.21.5 (#15)

* Update bom and aves version

* Update artifact from Minestom

---------

Co-authored-by: theEvilReaper <steffenwx@gmail.com>

* Remove generic usage (#16)

* Remove generic value usage

* Update test base to reflect the flattened structure

* Rename class to reflect their context usage

* Add new methods

* Override equals and hashcode

* Rename class

* Add tests for the service class

* Remove generic mention in the documentation

* Update version number

---------

Co-authored-by: theEvilReaper <steffenwx@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants