Skip to content

support for folia#126

Merged
Bastian merged 3 commits intoBastian:masterfrom
ricsal1:folia
Sep 22, 2024
Merged

support for folia#126
Bastian merged 3 commits intoBastian:masterfrom
ricsal1:folia

Conversation

@ricsal1
Copy link
Copy Markdown
Contributor

@ricsal1 ricsal1 commented Sep 16, 2024

SubmitTaskConsumer seems to halt processing on the scheduler with Folia and since the scheduler itself is usable in schedule and scheduleAtFixedRate methods, so on folia version it is passed a null in order to force call this.submitData().

Tested with auto-generated Metrics class for bukkit with the changes presented here with bstats https://bstats.org/plugin/bukkit/CoolGateway/23166

Regards

boolean logResponseStatusText = config.getBoolean("logResponseStatusText", false);

String minecraftVersion2 = Bukkit.getServer().getName();
boolean folia = (minecraftVersion2.toUpperCase().contains("FOLIA"));
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This wouldn't catch forks of folia, you should detect if the class io.papermc.paper.threadedregions.RegionizedServer exists instead.

Copy link
Copy Markdown
Owner

@Bastian Bastian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few small code changes, but overall looks good to me.

Thanks for the PR! 👍

Comment thread bukkit/src/main/java/org/bstats/bukkit/Metrics.java Outdated
Comment thread bukkit/src/main/java/org/bstats/bukkit/Metrics.java Outdated
@Bastian Bastian merged commit 388d72a into Bastian:master Sep 22, 2024
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.

3 participants