SignShop 5.2.0
⚠️ BACKUP FIRST!
Back up your plugins/SignShop/ folder and test on a non-production server before installing. This update includes automatic data migration.
This update was developed with Claude Code AI assistance. All code was manually reviewed, approved, and tested.
_________________________________________________________
Requirements
- Java 21 required (up from Java 17)
- Spigot/Paper 1.21+ required
- Older Minecraft versions: Use previous SignShop releases (see download links in overview)
_________________________________________________________
Modern Item Serialization
The Problem
The legacy serialization system (BukkitObjectOutputStream) caused item corruption when Minecraft versions changed. Shops would break, items would become unrecognizable, and Trade shops would fail to match items after server updates.
The Solution
- New YAML+Base64 format using Bukkit's native ItemStack.serialize() API
- Automatic migration on first startup — creates timestamped backup before converting
- Data version normalization — items now survive Minecraft updates without breaking ItemStack.equals() comparisons
- Legacy format still supported for reading (backward compatible)
Technical Details
Code (Text):
# sellers.yml format detection:
"YAML:..." → Modern format (v5.2.0+)
"LEGACY:..." → Explicit legacy fallback
"rO0AB..." → Old BukkitObjectOutputStream (auto-migrated)
# Data version fix for cross-MC-version compatibility:
ItemStack normalized = ItemStack.deserialize(item.serialize());
_________________________________________________________
️ Incompatibility Detection Framework
The Problem
Certain items cause server crashes during serialization. For example, player heads created by older versions of HeadDatabase (pre-4.20.3) have empty name fields that trigger NPE errors in Spigot 1.21.10+.
The Solution
- Extensible detector framework identifies problematic items before they cause crashes
- Incompatible items remain in safe LEGACY format while compatible items use modern YAML
- User-friendly error messages instead of stack traces when shops contain problematic items
- Auto re-migration — when Spigot fixes underlying bugs, shops automatically upgrade on next restart
For Developers
Code (Text):
// Check individual items:
IncompatibilityType issue = IncompatibilityChecker.checkItem(itemStack);
// Check item arrays:
boolean hasIssues = IncompatibilityChecker.hasIncompatibleItems(items);
// Add custom detectors by implementing IncompatibilityDetector interface
_________________________________________________________
Hover Tooltips
Item names in transaction messages now support hover tooltips showing item details.
- Paper servers: Full item details (enchantments, lore, all metadata) via native tooltip API
- Spigot servers: Basic item type info (Spigot API limitation — no native tooltip support)
New Config Options
Code (Text):
# Show item details inline in chat text (enchantments, etc.)
ShowItemDetailsInChat: false
# Enable hover tooltips on item names
ShowItemHovers: true
_________________________________________________________
⚡ Performance Improvements
32% Faster Transactions
- Operation caching: Sign type operations are now pre-compiled at config load instead of using reflection on every transaction
- Item deserialization caching: Seller.getCachedMiscItems() — items deserialize once per restart, not per transaction
- takeVariablePlayerItems optimization: Calculation results cached in messageParts, survives operation reset cycles
Benchmark
Code (Text):
Before: ~4.47ms average per transaction
After: ~3.04ms average per transaction
_________________________________________________________
Bug Fixes
| #168 |
Potions not working in 1.21+ |
Updated for 1.21 potion API changes |
| #83 |
Named items not matching in Trade shops |
NBT normalization fixes item comparison |
| #161 |
Fireworks stock detection incorrect |
Fixed complex NBT comparison logic |
| — |
Trade shops break after MC updates |
Data version normalization on deserialization |
| — |
Dynmap 3.0+ integration broken |
Updated API calls for Dynmap 3.0+ |
_________________________________________________________
Code Cleanup
- Removed deprecated SSDoor.java — use BlockData API
- Removed laggy fixBooks() method — no longer needed
- Updated Towny integration for modern API
- Java 21 language features throughout codebase
_________________________________________________________
Migration Notes
What Happens on First Startup
- SignShop detects DataVersion < 4 in sellers.yml
- Creates backup: sellers.yml.backup-YYYYMMDD-HHMMSS
- Migrates each shop's items:
- Compatible items → YAML format
- Incompatible items → LEGACY format (safe fallback)
- Updates DataVersion to 4
- Logs migration summary
If Something Goes Wrong
- Stop server
- Restore from backup: cp sellers.yml.backup-* sellers.yml
- Report issue on GitHub or Discord with:
- Full server log from startup
- Minecraft/Spigot version
- List of plugins
__________________________________________________________
Links