-
-
Notifications
You must be signed in to change notification settings - Fork 211
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
Fire ChangeWorldGameRuleEvent #3201
Fire ChangeWorldGameRuleEvent #3201
Conversation
For normal usage, changing a function’s type from |
That is absolutely wrong. It would require any plugins that build against the current API to be recompiled because it is still a signature change. In this case, any plugin that uses TL:DR; do not change any existing methods in the API for API 7. |
Is there any solution to tell that WorldProperties#setGameRule might not have been completed ? (when event cancelled) |
No, at least, not one I'd consider acceptable. We actually had this issue when we were implementing the |
Well I guess I have to take the train of API-8 before it's too late |
As SpongeAPI-7 modification is not possible, I guess this PR is not WIP anymore. |
Totally my fault for not realizing this. I don't investigate compiled code often and didn't know that compiled code points to a method with the specific signature, although that makes a lot more sense and something I forgot to consider. Apologies for my dumb comment since I don't make my own APIs often. |
I'm going to close this for the same reasons as #3226 (comment) - but thanks as it did influence API 8. |
Hey,
As @dualspiral advised me, I'm trying to develop by my own as much as I can instead of reporting issues.
So, I try to make Sponge fire the ChangeWorldGameRuleEvent which was not used.
There is two (maybe 3) places where we have to fire this event :
This is my first time using the mixins so this is why I marked this PR as WIP, if you have any remarks just let me know.
There is also another point. I would like to give the information for plugin makers that modification of a game rule is cancellable. It means that in the API, WorldProperties#setGameRule should return a
boolean
instead ofvoid
.Is this possible or is this a breaking change ?
Thank you for reading this PR.