refactor: optimize core utilities (Scheduler, logging, migration)#273
Closed
Alexteens24 wants to merge 2 commits into
Closed
refactor: optimize core utilities (Scheduler, logging, migration)#273Alexteens24 wants to merge 2 commits into
Alexteens24 wants to merge 2 commits into
Conversation
Introduce a Strategy Pattern for Folia/Paper scheduling with explicit init, fix logging event semantics and thread-safe file I/O, and modernize legacy migration code to use Damageable and Registry APIs on Paper 1.21.11. Co-authored-by: Cursor <[email protected]>
Always route delayed Folia tasks through runDelayed with foliaDelay() instead of running immediately when delayTicks <= 0, preserving the original production behavior. Co-authored-by: Cursor <[email protected]>
Contributor
Author
|
Closing in favor of a smaller follow-up PR with only the shouldLogEvent() naming/semantics fix. |
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.
Summary
Schedulerwith a Strategy Pattern (BukkitSchedulerImpl/FoliaSchedulerImpl), explicitScheduler.init()inonEnable, and preserved Folia fallbacks plus full public API compatibility.LoggingConfig.shouldLogEvent()(correct semantics) and optimizeSpawnerActionLoggerwith thread-safe file I/O, hybrid size tracking, batch draining, and async rotation only when needed.SpawnerDataConverterfor Paper 1.21.11 usingDamageable,Registrylookups with legacy fallbacks, andItemStackSerializer.isDestructibleItem()for consistent inventory migration output.