thomasmny / BuildSystem

Powerful, easy to use system for builders
https://buildsystem.eintosti.de
Other
35 stars 16 forks source link

`//undo` sometimes stops working when FAWE is used and world unloading is enabled #91

Closed Schuwi closed 2 years ago

Schuwi commented 2 years ago

The issue is caused by FAWE but users of the BuildSystem should be aware and a workaround could be implemented in BuildSystem if the issue persists. See https://github.com/IntellectualSites/FastAsyncWorldEdit/issues/1671 for more information.

When using world unloading (world.unload.enabled true in config) it can happen that undo and redo sporadically stop working. The higher the unload delay and the more often players use worldedit the less likely this bug is to occur. Even when the conditions are "right" for this bug to occur (see the linked issue for steps to reproduce) it has a chance to just work instead because it depends on the Garbage Collector of the VM collecting the org.bukkit.World.

For a quick and (very) dirty workaround (which might work, kinda hard to test because of aforementioned reliance on the GC) see https://github.com/Schuwi/BuildSystem/tree/Schuwi/patch-we.

Schuwi commented 2 years ago

I just noticed my patch won't work if you /tp out of the world.

Edit: fixed it.

thomasmny commented 2 years ago

I'll leave this issue pinned for people to see and then they can use your patch if they want to.

However, I won't be implementing this in the plugin itself due to the fact the FAWE requires Java 17 since version 2.0.0. And the majority of BuildSystem servers (sadly) still use Minecraft 1.8 and Java 8 (Source) which is why I can't use the patch in production and we'll have to wait for FAWE to fix the issue on their side

thomasmny commented 2 years ago

Has been fixed by upstream