-
-
Notifications
You must be signed in to change notification settings - Fork 343
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
Replace Service Manager with Provider #2133
Conversation
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.
Interesting concept.
But how do I get access to the ServiceProvider? AFAICT there is no longer a static way to get that instance.
src/main/java/org/spongepowered/api/event/service/ProvideServiceEvent.java
Outdated
Show resolved
Hide resolved
src/main/java/org/spongepowered/api/service/ServiceProvider.java
Outdated
Show resolved
Hide resolved
You need to remember that this is a proof of concept and is a draft - something that's come up after discussion with Zidane. Because init is still up in the air and it's not clear where the access will go, I've not added it, and that's concious. It will be added. This concept may not go futher - if it does, I'll expend the effort then. |
6fcab79
to
63f4557
Compare
63f4557
to
acdd90b
Compare
SpongeAPI | SpongeCommon
@Zidane For discussion. Very proof of concept-y, but this was what I was thinking. Plugin recieves event. Plugin chooses whether to supply to event. Event only sent to a plugin if:
You'll see in Common that I send the event to one plugin at a time. I've not added the service provider to
Game
orSponge
yet, that's part of the discussion!Vanilla/Sponge services have low priority and will always be created last (or as a fallback to a named provider that failed to load)