Skip to content

Feat/folia support#244

Merged
Jsinco merged 7 commits into
InsightsPlugin:mainfrom
Euphillya:feat/folia-support
May 15, 2026
Merged

Feat/folia support#244
Jsinco merged 7 commits into
InsightsPlugin:mainfrom
Euphillya:feat/folia-support

Conversation

@Euphillya
Copy link
Copy Markdown
Contributor

This PR removes support for Spigot

}

getServer().getScheduler().runTaskLater(this, () -> {
getServer().getGlobalRegionScheduler().runDelayed(this, (scheduledTask) -> {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

i think that this could use the async scheduler

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I've never tried loading Bukkit.getPluginManager().registerEvents async, does it work?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ah, well, it seems to work :
[00:06:18 INFO]: [Insights] Loaded addon 'Skyllia' v1.0

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Afaik it should work, i'll ask around in the paper discord

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Ah, well, it seems to work : [00:06:18 INFO]: [Insights] Loaded addon 'Skyllia' v1.0

Nicee

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

[00:12:09 INFO]: [Insights] Registered listener of addon 'Skyllia'
[00:12:09 INFO]: [Insights] Loaded addon 'Skyllia' v1.0

I forgot a line, so I'm editing it.

Copy link
Copy Markdown
Contributor Author

@Euphillya Euphillya May 14, 2026

Choose a reason for hiding this comment

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

After looking at how listeners are registered in Paper/Folia, HandlerList#handlerslots is an EnumMap which is not thread-safe. Therefore, I would suggest simply re-registering it in the global scheduler during startup.

@Jsinco
Copy link
Copy Markdown
Member

Jsinco commented May 15, 2026

lgtm

@Jsinco Jsinco merged commit c3e4e60 into InsightsPlugin:main May 15, 2026
1 check passed
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