This update brings significant under-the-hood improvements to HjVaults, focusing on eliminating server lag spikes, optimizing database I/O, and fixing critical bugs related to the strict Paper/Folia environments.
We highly recommend all users update to this version for a smoother experience!
What's New & Improved
100% Asynchronous Database Operations
- Completely refactored the internal StorageProvider (SqlStorage & YamlStorage).
- Saving, loading, and modifying vault metadata (e.g., custom icons, renaming) are now fully handled on background threads asynchronously.
- Opening menus, opening vaults (/pv), and closing vaults will no longer freeze the server or drop your TPS, regardless of how slow your database connection is!
Optimized GUI Rendering
- The main Vault Menu (/pv) now concurrently fetches the metadata (names & icons) for all vaults on a specific page in the background before rendering the GUI. This results in incredibly snappy menu navigation, even for players with hundreds of vaults.
Critical Bug Fixes
- Paper & Folia Search Fix: Fixed a severe IllegalStateException that occurred when players used the search function. The system no longer creates temporary Bukkit Inventories off the main thread, making it 100% safe and compliant with strict Paper/Folia thread policies.
- Shift-Click Duplication Glitch Patched: Fixed an exploit where players could use the Shift-Click (MOVE_TO_OTHER_INVENTORY) action to bypass locked rows by matching items in their own inventory with the locked row placeholder items.
Under The Hood
- Cleaned up internal API calls and safely decoupled Bukkit-specific logic from raw database I/O.
- Improved the plugin's code formatting and lambda structure for better long-term maintainability.
Issue
Every time a new plugin version was released with new config options, server owners had to delete their entire plugin folder and reconfigure everything from scratch. This was frustrating, especially for servers with custom economy prices, database settings, and custom GUI layouts.
Root Cause
The plugin used Bukkit's default saveDefaultConfig(), which only creates a config file if it doesn't already exist. Once a player has a config file, new keys added in future updates are silently ignored — the player never sees them unless they manually delete their file and start over.
What Changed
Starting from v1.2, the plugin now uses a smart config merger (powered by boosted-yaml). Every time the server starts or you run the reload command, the plugin automatically:
Action Before (v1.1) After (v1.2) New config keys added Never appear in existing files
Automatically added into your config
Your custom values Lost when you delete the file
Kept exactly as you set them
Comments in config Lost when you delete the file
Preserved — both default and your own
/pvr (reload command) Only reloads existing values Also merges new keys from the jar
Updating the plugin Must delete plugin folder Just replace the jar and restart
How It Works
- The plugin compares your existing config with the default config packed inside the jar.
- Any new or missing keys are automatically added to your file.
- Your existing values are never overwritten.
- All comments (both from the default and any you added yourself) are preserved.
- A config-version key is added to config.yml and gui.yml for internal tracking — do not change it manually.
What This Means for Server Owners
No more deleting configs on update — just replace the jar and restart
No more losing your settings — economy prices, database config, GUI layout all stay
No more missing features — new config options appear automatically
/pvr (reload command) now also picks up new config keys
Works for both config.yml and gui.yml
Migration
No action required. When you update from v1.1 to v1.2:
- Replace HjVaults-1.1.jar with HjVaults-1.2.jar
- Restart the server (or run /pvr)
- New config keys (input-method, chat-timeout, chat-input-prompt, etc.) will automatically appear in your existing config.yml
- Your previous settings are untouched
Issue
When using the Rename or Search features, the sign menu would flash open and instantly close on Paper 1.21+, making it impossible to type. In some cases, it could also leave leftover sign blocks in the world.
Root Cause
Two problems were found in the old implementation:
- Packet Race Condition — The old code opened the sign menu while the inventory was still closing. On modern Minecraft clients, the "close inventory" packet arrives after the "open sign" packet, causing the sign to appear briefly and then get closed immediately.
- Real Blocks Placed in the World — The old code physically placed an Oak Sign block under the player to create the input menu. This could cause chunk issues, leftover blocks, or visual glitches.
What We Changed
Before After Placed real sign blocks in the world Uses fake packets only — no blocks are placed or destroyed Opened the sign while inventory was still closing Closes the inventory first, then waits 2 ticks before opening the sign No backup plan if the sign failed Chat input fallback — if the sign can't open, players type in chat instead Only one input method Configurable: choose SIGN or CHAT in config.yml
New Features
Packet-based sign editor (via Rapha149/SignGUI library) — clean, no world modification
Chat input fallback — stable alternative with a 30-second timeout and /cancel support
Config option input-method: SIGN (default) or CHAT — full control to server owners
ProtocolLib soft-dependency — sign editor requires it, but the plugin still works without it (falls back to chat)
Requirements
- ProtocolLib (recommended) — enables the packet-based sign editor
- Without ProtocolLib, the plugin automatically uses chat input instead — nothing breaks
