Skip to content

Folia Support & Modernize Expansion#22

Open
R00tB33rMan wants to merge 5 commits into
PlaceholderAPI:masterfrom
GemstoneGG:master
Open

Folia Support & Modernize Expansion#22
R00tB33rMan wants to merge 5 commits into
PlaceholderAPI:masterfrom
GemstoneGG:master

Conversation

@R00tB33rMan
Copy link
Copy Markdown

@R00tB33rMan R00tB33rMan commented May 7, 2026

I'd assume this expansion is inactive; however, this PR is designed for people who continually run into problems with the base Bungee expansion and covers all "known" possible race conditions. This PR also generalizes the placeholder and uses "proxy" instead of "bungee," since "bungee" is a bit specific platform-wise.

E.g. of conversion:
%bungee_total% -> %proxy_total%

Explanation:

  1. Player count calculations must be performed concurrently to ensure for edge cases on Folia (not worth the "risk")
  2. Bukkit schedulers are plainly not supported on Folia, void consideration
  3. Folia schedulers are prone to freeze-ups and desynchronization/breakages of player count calculations, void consideration
  4. ExecutorServices perform on their own thread; thus, they are substantially less prone to desynchronization; thus, player counts won't brick
  5. getOnlinePlayers is not thread-safe. Should be wrapped in an ArrayList (or similar) to ensure that it's not directly reading from process to mitigate crash (rare but CAN happen)

Closes: #18 (Supersedes)
Fixes: #21

@R00tB33rMan R00tB33rMan changed the title Modernize Expansion Folia Support & Modernize Expansion May 7, 2026
@Andre601
Copy link
Copy Markdown

Andre601 commented May 7, 2026

I dislike the renaming a lot for multiple reasons:

  • Renaming breaks pre-existing setups by people. If they update the expansion and suddenly no placeholder works anymore, they will be frustrated and the HelpChat team has to deal with the complains.
  • Renaming requires the Repository and ecloud entry to be updated too, to avoid any inconsistencies (You don't download the vault expansion and have luckperms placeholders).
  • This renaming would result in the people never being notified about an update, since the bungeecord expansion they use never got updated, so this change would effectively be useless, if the goal is for people to get the update to receive fixes.

Downgrading the version makes no sense either. If anything should this be a v3 to indicate a breaking change... Or be a separate project, which I personally recommend over changing a pre-existing expansion that massively.

Also, has the Scheduler changes been tested to also be safe on Spigot? PAPI servers Spigot too, even if Paper is better in multiple ways, so making sure that it can still work on non-Folia and non-Paper servers is a must imo.

Also, you're using two sets of annotations where only one should be used. Either stick with jspecify or jetbrains annotations, but not both.

@R00tB33rMan
Copy link
Copy Markdown
Author

R00tB33rMan commented May 7, 2026

I was under the impression that this expansion was no longer maintained, as PlaceholderAPI implemented support for Folia a good bit ago, and this was used as a "modernized" gateway for people simply wanting a more "AIO" replacement and wasn't targeted towards people on the Spigot platform.

If you (or the associated author) intend to merge a PR like this, I'd be happy to reconsider this entire PR.

In a direct sense, none of the provided changes would actually break Spigot support except for the technicalities of converting from Spigot -> Paper in the POM.

@R00tB33rMan
Copy link
Copy Markdown
Author

Hey @Andre601, I went ahead and reverted all logic and applied your tips/suggestions (alongside testing this against Spigot). Let me know if you'd like any other changes, and I'll make them. Hopes this PR sees a merge!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Doesn't work in 1.21.11 Folia

2 participants