Merged
Conversation
…bustness with bulk save fallback and PK migration duplicate checks.
…aultViewInfo` tracking from commands, along with data safety improvements and scope-aware vault icons.
…xception variable naming.
…to economy operations to avoid redundant checks
…ound threads to prevent server freezes.
… saving vault icons.
Added loadVaults to StorageProvider interface. Implemented efficient batch retrieval in: MySQLStorageProvider (using IN (?) clause). MongoStorageProvider (using $in operator). FileStorageProvider (single file parse). RedisCacheLayer (pipelining + cache-through logic). perf: VaultSearcher Optimization: Updated VaultSearcher to use loadVaults, replacing N database queries with 1 single query per search.
…orage support, and enhance storage conversion logic.
…ew `/pv unlock` command.
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.
📝 Description
This PR introduces a comprehensive architectural overhaul, transitioning the plugin into a high-performance solution for large-scale Minecraft networks. The primary focus is the implementation of Scoped Storage, allowing administrators to maintain separate player inventories across different server groups (e.g., Survival, Creative, and Skyblock) within the same database.
🚀 Key Changes
1. Scoped Storage & Enterprise Database Support
scopevariable across all storage providers (MySQL, MongoDB, FlatFile) to differentiate vault data based on server environment.initializemethod inMySQLStorageProvider.javato automatically migrate existing tables, adding thescopecolumn and updating Primary Keys while checking for potential data duplicates.loadVaultsfor efficient batch loading and added robust error fallbacks to individual saves if bulk transactions fail.2. UI/UX Modernization
VaultSelector.java) replaces legacy text-based navigation.VaultSearcher.java) that allows players to locate items across all owned vaults instantly.SearchPrompt.javato handle search queries via the Bukkit Conversation API, providing a cleaner user experience.3. Performance & Reliability
RedisCacheLayerandRedisMessageListenerto provide near-instant cross-server synchronization and prevent duplication exploits on BungeeCord/Velocity networks.PlayerVaults.javawith asafelyCloseVaultmethod to ensure all open inventories are committed to storage during server restarts or crashes.🛠 Testing Accomplished
Administrators upgrading from v4.x or earlier must backup their
/plugins/PlayerVaults/vaultsdirectory. The plugin will attempt an automatic database migration upon the first launch of v1.0.2. If duplicates are detected in the MySQL table, the migration will abort and require manual cleanup to ensure data integrity.Architectural Checklist
sun.misc.Unsafeor other internal APIs.StorageProviderinterface pattern.Related Issue
Closes #