Skip to content

Conversation

@theEvilReaper
Copy link
Contributor

To avoid different approaches for game setups, we created a library called Guira. To enhance their structure and reduce maintainability this pull request adapts the current aproach to variant from Guira. Some calls looks cursed or not good by it's design. This could be improved over the next time

@theEvilReaper theEvilReaper requested a review from TheMeinerLP June 6, 2025 09:46
@theEvilReaper theEvilReaper self-assigned this Jun 6, 2025
@theEvilReaper theEvilReaper added enhancement New feature or request help wanted Extra attention is needed labels Jun 6, 2025
Copy link

@OneLiteFeather OneLiteFeather left a comment

Choose a reason for hiding this comment

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

Looks good so far, I just have one request

Comment on lines +93 to +96
manager.addListener(
(Class<SetupFinishEvent<InstanceSetupData<? extends BaseMap>>>) (Class<?>) SetupFinishEvent.class,
new SetupFinishListener(instanceSwitcher)
);
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks complicated. Is there a better way ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The available options are limited. Minestom does not allow direct use of the raw event class due to its generic structure. One possible solution would be to create an additional class that sets the generic value internally, but this would require an update to Guira

@theEvilReaper theEvilReaper merged commit b85cc2b into develop Jul 14, 2025
2 of 6 checks passed
@theEvilReaper theEvilReaper deleted the feature/guira branch July 14, 2025 18:29
theEvilReaper added a commit that referenced this pull request Jul 15, 2025
* Add guira as new dependency

* Add guira definition

* Add new data implementation

* Rework data structure

* Update SetupData handling

# Conflicts:
#	setup/src/main/java/net/theevilreaper/tamias/setup/TamiasSetup.java

* Remove test classes

* Update constructor calls

* Remove BiConsumer variable and parameter usage

* Cleanup imports

* Improve SetupData usage

* Update flag usage

* Improve message when a data is not present

* Cleanup imports
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Feature help wanted Extra attention is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants