Add folia support#204
Conversation
|
@TechnicallyCoded Can you review the pull request? |
|
Life saver, confirmed working on our Folia server! |
|
bump |
|
Folia is the future 👍 |
Agreed. I will try my best to keep up the fork updated until it's reviewed |
|
As I have already previously stated on the Discord server, I will not officially support this due to the stability issues of simply moving around schedulers for folia-conversion, but I will also not close the PR so that people can find the pull request and use it if they are willing to accept the risk. |
I’ll keep it updated with the main plugin so it stays usable. I’m also planning to work on a more stable approach, which could make this mergeable in the future. I know the current solution isn’t ideal stability-wise since it was originally made just to work on my own server. |
# Conflicts: # src/main/java/me/danjono/inventoryrollback/gui/menu/MainInventoryBackupMenu.java # src/main/java/me/danjono/inventoryrollback/listeners/ClickGUI.java
|
@TechnicallyCoded If you decide to merge this PR at some point, feel free to keep or remove my name from the authors if you want. |
|
so far running without issues for about 1.5 months |
Fix MainInventoryBackupMenu not showing armor contents
|
https://mclo.gs/aLlycwF |
|
Read above please. As I have already previously stated on the Discord server, I will not officially support this due to the stability issues of simply moving around schedulers for folia-conversion, but I will also not close the PR so that people can find the pull request and use it if they are willing to accept the risk. |
# Conflicts: # src/main/java/me/danjono/inventoryrollback/gui/menu/EnderChestBackupMenu.java
On Folia the "async" helpers in SchedulerUtils were dispatching to the global/region tick schedulers instead of a real async pool - runTaskAsynchronously -> getGlobalRegionScheduler().execute() - runTaskLaterAsynchronously -> region/global runDelayed() - runTaskTimerAsynchronously -> global runDelayed() loop This is harmless until a caller blocks.. ClickGUI restore flow calls PlayerData.getAllBackupData().get() inside runTaskAsynchronously and getAllBackupData() itself schedules the completing work via the same helper. Both halves land on the single global tick thread, the outer task blocks the thread waiting on a future that can only be completed by a task queued behind it on that same thread = permanent self deadlock. With MySQL storage this freezes the global region on every restore GUI interaction (FoliaWatchdogThread: "Global region has not responded") recoverable only by force restart. Route all three async helpers to getAsyncScheduler(). The async scheduler is time based, so tick delays are converted to milliseconds and clamped to a positive minimum where the API requires it. The non-Folia paths are unchanged.
…adlock Fix global-region deadlock by routing async tasks to the async scheduler
Adds folia support without use of any external API
Tested on: