You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using Pixelmon Reforged on one of our servers and when a player joins it results in this error.
My cautious guess would be that NeoForge allows the stat increment to be run async whereas Bukkit does not.
This patch is aimed on forcing the event to be run sync. on the Bukkit side. message.txt
This simply won't work as you are expecting.
Inject works by creating an instance of CallbackInfo and pass it into the injector. When the injector returns, the method will check if callback info is cancelled. If it's not it will proceed.
In this case, callback info is submitted to the main thread and wait for processing and cancellation. Meanwhile the injector has already returned and the method checks CallbackInfo and discover it's not cancelled, so the statistics increment will proceed.
You can notice that the cancellation of the event does not work anymore. A good fix might be a main thread check before firing the event. If it's not on the server thread, submit it to the server thread but do not process cancellation. If it's on the server thread, fire synchronously and process cancellation if needed. Doing like this makes the event cancellation useless even on the server thread, which breaks all plugins using this event.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We are using Pixelmon Reforged on one of our servers and when a player joins it results in this error.
My cautious guess would be that NeoForge allows the stat increment to be run async whereas Bukkit does not.
This patch is aimed on forcing the event to be run sync. on the Bukkit side.
message.txt