Add Folia compatibility with full backward compatibility#667
Open
Aelshi-nui wants to merge 3 commits intoDevLeoko:masterfrom
Open
Add Folia compatibility with full backward compatibility#667Aelshi-nui wants to merge 3 commits intoDevLeoko:masterfrom
Aelshi-nui wants to merge 3 commits intoDevLeoko:masterfrom
Conversation
- 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.