Skip to content

Conversation

@Aelshi-nui
Copy link

Introduces Folia compatibility using a runtime-detected scheduler abstraction while preserving existing behavior on Paper-based servers.
This update targets the core and bukkit modules. The bungee module is not included in the bundled artifact due to existing CloudNet dependency requirements.

Aelshi-nui and others added 3 commits January 26, 2026 08:22
- Implement runtime-detected scheduler abstraction layer
- Add SchedulerAdapter interface for cross-platform scheduling
- Add PaperSchedulerAdapter for Paper/Purpur/Spigot using BukkitScheduler
- Add FoliaSchedulerAdapter using reflection-based region scheduling
- Add SchedulerProvider for automatic server type detection
- Refactor BukkitMethods to use scheduler abstraction
- Refactor ConnectionListener to use scheduler abstraction
- Refactor BukkitMain for Folia-safe player iteration
- Add folia-supported flag to plugin.yml

Technical details:
- Zero breaking changes to existing API
- No compile-time dependency on Folia
- Async operations use AsyncScheduler on Folia
- Sync operations use GlobalRegionScheduler on Folia
- Entity operations use proper region scheduling on Folia
- All database operations remain thread-safe and async
- Cross-server synchronization fully preserved

Compatibility:
- Paper: Full support via BukkitScheduler
- Purpur: Full support via BukkitScheduler
- Spigot: Full support via BukkitScheduler
- Folia: Full support via region-based scheduling
- Other Paper forks: Full support via BukkitScheduler

Thread safety:
- No unsafe Bukkit API access across threads
- No blocking operations on region threads
- No race conditions or deadlocks introduced
- All punishment logic behavior preserved exactly
Ensures player messages, kicks, and notifications execute on the
correct region in Folia to prevent cross-region access violations.
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.

1 participant