Could not pass event InventoryClickEvent to CrazyCrates v3.6 Folia 1.21
Closed this issue · 20 comments
Spark link
No response
Plugin Version
3.6
Server Version
1.21
Server Platform
Folia
Describe the bug
Crate Type
None
Steps to reproduce
Additional context
No response
Agreements
- I have searched for and ensured there isn't already an open issue regarding this.
- I ticked all the boxes without actually reading them
- My version of Minecraft is supported by CrazyCrew.
Not much I can do with that, it points to nothing in CrazyCrates itself in the stacktrace except one line.
I don't run any tasks in the click event that try to read the world.
When I shared this problem as Folia's github issues, they said it was a plugin problem. Frankly, I was confused about what to do.
I just checked the line it points to, I don't run any task that would cause that error. The line it points to is a method handled purely by the server, so something must've changed internally.
Should I report this to folia then?
I don't know, if they sent you here. You just going to be bounced back and forth.
Hell yeah the hours of hell begin for me. Thanks.
if (!(inventory.getHolder(false) instanceof CratePrizeMenu holder)) return;
This is the line it throws the error on in question, I don't run any task that would make this throw that exception, so my only bet is that it's something to do with inventory#getHolder internally. I simply use the API provided.
I see this was your issue here, PaperMC/Folia#270. a stacktrace would've probably helped, but they might bounce you back here.
if (!(inventory.getHolder(false) instanceof CratePrizeMenu holder)) return;This is the line it throws the error on in question, I don't run any task that would make this throw that exception, so my only bet is that it's something to do with inventory#getHolder internally. I simply use the API provided.
I see this was your issue here, PaperMC/Folia#270. a stacktrace would've probably helped, but they might bounce you back here.
maybe your plugin reads incorrectly world data?
java.lang.IllegalStateException: Cannot read world asynchronously
I got same error in my private plugins and need correct write code for correct read world?
I don't read the world in that event. false
implies I don't need an entire snapshot.
you checked this line in logs?
at CrazyCrates-3.6.jar/com.badbones69.crazycrates.listeners.crates.CosmicCrateListener.onPrizeReceive(CosmicCrateListener.java:62) ~[CrazyCrates-3.6.jar:?]
I don't read the world in that event.
false
implies I don't need an entire snapshot.
That's the same thing, it checks if the inventory holder matches.
So I think paper maybe close is soon issues created by Potenza
I understand how fix it. You need use RegionScheduler for get correct region in Folia. Because Folia working with Regions
where ticking in thread(core) of cpu.
That ignores the issue.
That ignores the issue.
what is issues?
It's an oddity that it needs a region scheduler, despite not running in what I would assume an unsafe way? There is no task putting it anywhere else?
I've even looked into Folia's source, the only thing is that check preventing the getNMS
function from calling. everything still works.
I don't use the region scheduler at all for that area the stacktrace points to, there is no task running. it doesn't need one.
If there is a task running async while the holder tries to read the world, it's running internally in code I don't handle, upstream from Paper or Folia.
Ok, whatever how are you want. I just said error and how can will be fixed. Even if don't used any shedulers or RegionScheduler for Folia.
I can't reproduce on dev/1.21
of Folia, latest commit 2b8c879