Closed SlimeDog closed 1 year ago
Reminder that these are still reported by Paper 1.19.2.
Have asked in the Paper discord about this error, reply:
an EventHandler must return void
or, rather, should. non-void returns may be broken in the future and are not supported.
yeah just this whole class https://github.com/MLG-Fortress/ExtraHardMode/blob/e4f17b107651b0765f9a75a39399637c36ffd38c/src/main/java/com/extrahardmode/features/AntiGrinder.java#L157
just set it cancelled, remove all the returns— they don't do anything
unless you're doing something like calling the handler yourself (which you probably shouldn't)
Looking at the ExtraHardMode sources, onEntityDeath() and onEntitySpawn() are declared void in all cases except in src/main/java/com/extrahardmode/features/AntiGrinder.java, where they are declared boolean and return true or false. It doesn't look like the return values are used anywhere, so the fix would be straightforward, as outlined above.
I tried the fix locally, and it seems to work fine. Note that the assertFalse
and assertTrue
tests in src/test/com/extrahardmode/features/TestAntiGrinder.java
will have to be changed as well. I did not feel comfortable making those changes -- I don't know how testing works -- so I did not post a PR.
There is a new PR that covers this issue, both the code and the tests: https://github.com/MLG-Fortress/ExtraHardMode/pull/316
closed by #316
ah I see why this wasn't auto-closed, it wasn't linked by the PR author.
Confirmed fixed with the associated PR. Thanks.
Paper 1.18.1-161 and ff ExtraHardMode
On server start-up