Repository navigation
Performances / Refractor update - #270
Merged
Merged
Conversation
ANVIL inventories only have a packet engine on 1.21+. On older versions they fall back to the chest engine and rename-requirements never run. Log an error at load time and document the minimum version in the README. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
…some possible mem leak)
…nitial-value' and standardize 'after-action' syntax
…e and inversed download check
…er and improve loader retrieval logic
…handling and warning logging
…an up log upload success message (remove old check for spigot)
…on creation in ZInventoryManager
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.
This pull request introduces several improvements and refactorings across the codebase, focusing on performance, code clarity, and extensibility. Key changes include enhanced placeholder caching, improved color code handling, refactored inventory timer logic, and new extensibility for rule registration. Below are the most important changes grouped by theme:
Performance and Caching Improvements
PapiUtilswith a GuavaCache, supporting automatic expiration and size limits. This improves efficiency and reliability of placeholder resolution and cache management. The cache now respects dynamic configuration and removes the previousCacheEntrylogic. [1] [2] [3] [4]itemStackSerializedcache fromItemStackUtils, simplifying item stack serialization/deserialization and reducing memory usage. [1] [2] [3] [4]Inventory and Timer Refactoring
InventoryDefaultto use the plugin's scheduler (WrappedTask) instead of rawTimerTask, ensuring tasks are properly cancelled on inventory close and when replaced. This prevents memory leaks and redundant tasks. [1] [2] [3] [4]ZUtils, further centralizing task management and reducing legacy code.Extensibility and API Enhancements
registerRuleLoadermethod toButtonManager, allowing external plugins to register custom rule types for item rules, increasing the flexibility and extensibility of the API. [1] [2]Utility and Compatibility Improvements
CompatibilityUtil.getTopInventoryby caching method lookups withClassValue, reducing reflection overhead and improving performance for frequent inventory operations. [1] [2]OfflinePlayerCache.getto check for online players before using the cache, ensuring up-to-date player information.Color Code Handling
ZUtilsby using precompiled regex patterns andStringBuilder, making color transformations more efficient and robust, especially for hex color codes. [1] [2]