Skip to content

Add folia support#204

Open
yL3oft wants to merge 16 commits into
TechnicallyCoded:mainfrom
yL3oft:main
Open

Add folia support#204
yL3oft wants to merge 16 commits into
TechnicallyCoded:mainfrom
yL3oft:main

Conversation

@yL3oft

@yL3oft yL3oft commented Aug 7, 2025

Copy link
Copy Markdown
Contributor

Adds folia support without use of any external API

Tested on:

  • Folia 1.21.5
  • Paper 1.21.7

@yL3oft yL3oft mentioned this pull request Aug 8, 2025
@yL3oft

yL3oft commented Aug 19, 2025

Copy link
Copy Markdown
Contributor Author

@TechnicallyCoded Can you review the pull request?

@Karltroid

Copy link
Copy Markdown

Life saver, confirmed working on our Folia server!

@Rodal1

Rodal1 commented Nov 12, 2025

Copy link
Copy Markdown

bump

@SaidTorres3

Copy link
Copy Markdown

Folia is the future 👍

@yL3oft

yL3oft commented Nov 26, 2025

Copy link
Copy Markdown
Contributor Author

Folia is the future 👍

Agreed. I will try my best to keep up the fork updated until it's reviewed

@quiquelhappy

Copy link
Copy Markdown

@TechnicallyCoded

@TechnicallyCoded

Copy link
Copy Markdown
Owner

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.

@yL3oft

yL3oft commented Jan 24, 2026

Copy link
Copy Markdown
Contributor Author

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
@yL3oft

yL3oft commented Jan 26, 2026

Copy link
Copy Markdown
Contributor Author

@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.
Also in the latest commit, I also replaced the update link with the fork’s releases page.

@quiquelhappy

Copy link
Copy Markdown

so far running without issues for about 1.5 months

yL3oft added 2 commits April 6, 2026 19:38
Fix MainInventoryBackupMenu not showing armor contents
@Potenza7

Potenza7 commented May 9, 2026

Copy link
Copy Markdown

https://mclo.gs/aLlycwF
Folia 26.1.2 I'm getting this error, can you release an update please?

@TechnicallyCoded

Copy link
Copy Markdown
Owner

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.

Repository owner locked as resolved and limited conversation to collaborators May 9, 2026
yL3oft and others added 3 commits May 9, 2026 16:24
# 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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants