-
-
Notifications
You must be signed in to change notification settings - Fork 0
Migrate to the SetupData system from Guira #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
# Conflicts: # setup/src/main/java/net/theevilreaper/tamias/setup/TamiasSetup.java
d5afaff to
dd39b9e
Compare
setup/src/main/java/net/theevilreaper/tamias/setup/commands/parts/SetupPositionCommand.java
Outdated
Show resolved
Hide resolved
OneLiteFeather
left a comment
There was a problem hiding this 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
| manager.addListener( | ||
| (Class<SetupFinishEvent<InstanceSetupData<? extends BaseMap>>>) (Class<?>) SetupFinishEvent.class, | ||
| new SetupFinishListener(instanceSwitcher) | ||
| ); |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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
setup/src/main/java/net/theevilreaper/tamias/setup/commands/parts/SetupNameCommand.java
Outdated
Show resolved
Hide resolved
setup/src/main/java/net/theevilreaper/tamias/setup/listener/item/PlayerUseItemListener.java
Outdated
Show resolved
Hide resolved
* 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
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 fromGuira. Some calls looks cursed or not good by it's design. This could be improved over the next time