Upgradable SellChest v1.3

Let your players sell items automatically!

SellChest v1.3.0
Major Update - Premium UX · 6 Languages · Tiered Audio · Full Code Audit

Premium UX Overhaul 5-Tiered Sound System 6 Languages Auto-Update Configs 7 PAPI Placeholders Full Code Audit

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

What's New in 1.3.0

This is the biggest SellChest update since release. Every message, every GUI element, every hologram has been redesigned from the ground up. The plugin now speaks 6 languages, plays tiered audio feedback, and automatically keeps all configuration files up to date - without ever touching your settings.


Premium UX Overhaul

Complete Visual Redesign

Every message in the plugin has been rewritten with professional formatting, symbols, and color gradients. Gold headers with ✦ stars, dark gray ┃ separators, ◆ bullets - a consistent premium look across the entire plugin.

Enchanted SellChest Items

SellChest items now have a subtle enchantment glow (hidden enchant, visual only). Your chests look as premium as they perform.

Redesigned GUI

The upgrade interface now features dark-themed titles with ✦ accents, cleaner stat displays, and professional color coding for each upgrade path: gold for items, aqua for frequency, yellow for percentage.

Enhanced Holograms

Holograms now show the owner's name, a summary of upgrade levels, and a clean countdown timer. Configurable text shadow, height, and view distance. Formatted sale values with comma separators: +12,345.67$


Tiered Audio and Visual System

Five tiers of sale effects based on transaction value:

Small Sale ($1+) 10 particles, EXP_ORB sound + hat chime
Medium Sale ($1,000+) 20 particles, LEVELUP (1.8x pitch) + chime
Large Sale ($10,000+) 30 particles, LEVELUP (1.4x pitch) + chime
Huge Sale ($50,000+) 30 particles + END_ROD sparkles, LEVELUP + bell
Epic Sale ($50,000+) + FIREWORK_TWINKLE for truly epic moments

GUI Sound Feedback:
Open - Chest Open · Close - Chest Close · Upgrade Success - LEVELUP + Chime · Max Level - Bass Block · No Money - Bass Block (low pitch) · Toggle - Hat Block · Pickup - Item Pickup


6 Language Support

Switch language in config.yml - no server restart needed.

English · Polish · German · Russian · Spanish · French

All language files auto-update when the plugin updates - you'll never miss new messages. Just bump lang-version and the plugin handles the rest.



Smart Auto-Update System

Version-Tracked Configs

config.yml, upgrades.yml, and all 6 language files are tracked by version numbers. When you update the plugin, it automatically adds new keys from the built-in defaults - without overwriting a single setting you've customized.

Configurable Processing

New config sections: processing (batch size, notification interval), hologram (height, view distance, shadow, see-through), expanded effects controls. The autosaveInterval setting now actually works (previously hardcoded).


7 PlaceholderAPI Placeholders

%sellchest_count% - Number of owned SellChests
%sellchest_earnings% - Total earnings from all chests
%sellchest_sold% - Total items sold across all chests
%sellchest_time% - Time until next sale (nearest chest)
%sellchest_nearest_items% - Items per sale of nearest chest
%sellchest_nearest_freq% - Sell frequency of nearest chest
%sellchest_nearest_perc% - Price percentage of nearest chest

Display stats on scoreboards, chat messages, or menus - fully compatible with all PAPI renderers.



Full Code Audit - 520 Lines Removed

Every Java file has been reviewed, optimized, and cleaned.

Architecture Improvements

Extracted SalesProcessor class (170 lines of focused sale logic) · Centralized NBT writing method (eliminated 3x duplicate code) · Deduplicated upgrade GUI handler (140 lines into unified method) · Removed dead ConfigManager.java (200+ lines of unused code)

Performance Optimizations

Removed duplicate map lookups in listeners · Cached NamespacedKeys in ChestPlaceListener · Partitioned processing with configurable batch size · Notification system with offline player timeout

Number Formatting

All sale values and item counts now display with comma separators: 1,234,567 instead of 1234567. Clean, professional, readable at a glance.


Bug Fixes

V Memory Leak - Notification map grew indefinitely for offline players. Now cleaned up with 10-minute timeout.
V Data Loss - toggleRemoveUnsellableItems changes were not saved to disk (missing markDirty). Fixed.
V Hologram NPE - removeAllHolograms could crash if world was unloaded during shutdown. Safe-guarded.
V HologramTask NPE - Could crash if player was teleporting between worlds. Added null-check.
V ConfigManager NPE - Accessed MessageManager before initialization. Class was dead code, removed entirely.
V Economy NPE - Added null-check for EconomyType.getFromString("VAULT") in sales processor.
V Tab Complete - /sellchest top was missing from tab completer. Added.
V Plugin Reload - Old notification task was not cleaned up on reload. Properly shut down now.
V Version String - plugin.yml showed "unspecified". Now uses Gradle expansion: 1.3.0.
V Language Mixing - English file contained Polish words in lore keys. All 6 files verified clean.
V Log Consistency - All console messages standardized to English (were mixed Polish).
V RuntimeException Anti-Pattern - Replaced with clean boolean return flow for economy rollback.


Removed Dead Code

ConfigManager.java - 200+ lines of unused upgrade code
processSellChestSales() - unused method, replaced by partitioned processing
checkFAWE() - never-called method that always returned false
hasAnyProtectionPlugin() - unused utility method
Duplicate NBT writing - 3 identical code blocks, now one centralized method



━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Technical Specs
Version
1.3.0
Release Date
June 2026
Server
Paper 1.21+ · Java 21
Languages
EN · PL · DE · RU · ES · FR
Placeholders
7 PAPI placeholders
Sound Tiers
5 levels + GUI feedback


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Update from v1.0.0

Just replace the jar. All your data, settings, and chests are preserved. The plugin automatically updates config files to the new format while keeping every value you've customized. New language files are added automatically.

Zero manual migration. Drop in and go.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━



Critical Bug Fixes & Improvements

Fixed Issues:

1. Critical: Upgrade System Reset Bug
  • Issue: Upgrading a SellChest would reset the upgrade level back to 1
  • Cause: Conflict between manual value setting and automatic synchronization system
  • Fix: Completely refactored upgrade logic to use single source of truth (UpgradeManager)
  • Impact: All three upgrade types now work correctly (Item Amount, Sell Frequency, Sell Percentage)

2. Database Type Inconsistency
  • Issue: totalItemsSold was being saved as Integer despite database using BIGINT
  • Cause: Wrong type casting in DatabaseManager
  • Fix: Changed from stmt.setInt() to stmt.setLong() for proper Long handling
  • Impact: Prevents data overflow for large quantities of sold items

3. Potential NullPointerException in UpgradeManager
  • Issue: Could crash when accessing empty upgrade configurations
  • Cause: Missing null/empty checks in getLevelData() and getMaxLevel()
  • Fix: Added proper validation before accessing TreeMap keys
  • Impact: Improved plugin stability and error handling

4. GUI Display Inconsistency
  • Issue: Upgrade GUI showed incorrect prices and max levels
  • Cause: GUI was using deprecated ConfigManager instead of UpgradeManager
  • Fix: Updated all GUI display methods to use UpgradeManager
  • Impact: GUI now displays accurate upgrade information

Technical Improvements:
  • Removed legacy ConfigManager dependencies from upgrade system
  • Improved code consistency across all upgrade-related operations
  • Enhanced type safety in database operations
  • Better null safety throughout the codebase

Files Modified:
Code:
• UpgradeGUI.java - Complete upgrade system refactor
• UpgradeManager.java - Added null safety checks
• DatabaseManager.java - Fixed type casting for statistics

Compatibility:
  • No configuration changes required
  • Fully backward compatible with existing data
  • No API changes

Recommendation:
Update immediately if you're experiencing upgrade reset issues. This update fixes critical bugs that could affect server economy balance.

🔐 Critical Security Fixes​

1. Item Duplication Exploit Prevention

  • Location: UpgradeGUI.java
  • Issue: Race condition allowing multiple players to pickup the same SellChest simultaneously, duplicating items and statistics
  • Fix: Added synchronized blocks and state verification to prevent concurrent pickup operations
  • Impact: Prevents 2-3x item duplication exploits

2. Economy Transaction Rollback System

  • Location: SellChestManager.java
  • Issue: Items removed from chest but money not deposited if economy plugin crashes mid-transaction
  • Fix: Implemented inventory backup and automatic rollback on economy transaction failure
  • Impact: Prevents money/item loss during server lag or economy plugin failures

3. NullPointerException Crash Fix

  • Location: SellChestManager.java
  • Issue: Crash when EconomyShopGUI integration returns null items map
  • Fix: Added null checks for sellPrices.getItems() method
  • Impact: Prevents denial-of-service through plugin crashes

🛡️ High Priority Fixes​

4. Integer Overflow Protection

5. Owner Verification System (Anti-Tampering)

  • Location: SellChestManager.java
  • Issue: Players could manually edit YAML files to change chest ownership and steal earnings
  • Fix: Implemented checksum verification for owner UUID and location on data load
  • Impact: Prevents ownership manipulation and unauthorized money farming

6. Race Condition in Dirty Chests

  • Location: SellChestManager.java
  • Issue: Non-atomic operations on dirtyChests set could cause data loss during async saves
  • Fix: Added synchronized block around check-clear operations
  • Impact: Prevents data loss during high-frequency chest updates

7. ConcurrentModificationException Prevention

  • Location: SellChestManager.java
  • Issue: DoubleChest holder changes during iteration causing crashes
  • Fix: Added exception handling and safe update patterns for DoubleChest operations
  • Impact: Prevents crashes when players interact with double chests during sales

🔧 Medium Priority Fixes​

8. Double-Click Exploit Protection

  • Location: UpgradeGUI.java
  • Issue: Rapid clicking on upgrade buttons could withdraw money multiple times
  • Fix: Added 500ms cooldown between upgrade attempts per player
  • Impact: Prevents economy exploit through rapid clicking

9. Memory Leak Fix (Holograms)

10. Configuration Validation

  • Location: ConfigManager.java
  • Issue: Negative upgrade costs in config would cause free or money-generating upgrades
  • Fix: Added validation to reject negative cost values with warnings
  • Impact: Prevents config-based economy exploits

11. Protection Plugin Integration

  • Location: ChestPlaceListener.java
  • Issue: Text displays and data saved even when protection plugins (WorldGuard, GriefPrevention) cancelled placement
  • Fix: Added event.isCancelled() check and increased event priority to HIGH
  • Impact: Fixes ghost SellChests in protected regions

📊 Technical Details​

Files Modified: 10
Security Issues Fixed: 11
Performance Improvements: 3
Database Schema Changes: 1 (INT → BIGINT migration for totalItemsSold)

⚠️ Breaking Changes​

  • Database schema updated: total_items_sold column migrated from INT to BIGINT (automatic)
  • YAML format updated: Added _checksum field for integrity verification
  • Old save files will be automatically migrated on first load

🧪 Testing Recommendations​

  1. Test chest pickup with multiple players simultaneously
  2. Verify transaction rollback during economy plugin lag
  3. Test with protection plugins (WorldGuard, GriefPrevention, Lands)
  4. Monitor memory usage for hologram cleanup effectiveness
  5. Verify config validation with negative values
Buy a license now
$4.99
EULA
Standard EULA
Use on any projects you own with attribution
Support
Standard
Includes:
Download the resource
Access new updates
Support from the creator
Support duration
Lifetime
Share and earn
Refer this resource and earn a 5% commission.
399 Views
10 Purchases
6 Downloads
Apr 5, 2026 Published
Jun 21, 2026 Updated
Not yet rated
4.3 MB File size
Open source
  1. No
DRM-free
  1. Yes
Unobfuscated
  1. Yes
Type
  1. Gameplay
  1. Economy
  1. Shop
Game mode
  1. Survival
  1. Skyblock
  1. Economy
Supported software
  1. Paper
Supported versions
  1. 1.21.11
  1. 1.21.8
  1. 1.21.5
  1. 1.21.4
  1. 1.21.2
  1. 1.21
  1. 1.20
Supported languages
  1. English
  1. Spanish
  1. Russian
  1. German
  1. French
  1. Polish
Creator
Owner
Recommended for you
Christmas Weapons & Tools plugin for Paper 1.21 to 1.21.10 custom items, abilities
5.00 star(s) 1 ratings
10 purchases
Bring Quality Enchanting to Your Community
Not yet rated
8 purchases
A plugin that adds customizable gradient chat colors for players who have donated to the server.
5.00 star(s) 1 ratings
8 purchases
Smart Chat Pings. Player, Area, Global and Role Mentions.
Not yet rated
0 purchases
Modern Teleport Requests. Beautiful GUI. 26 Languages.
Not yet rated
0 purchases
Share and earn
Refer this resource and earn a 5% commission.
399 Views
10 Purchases
6 Downloads
Apr 5, 2026 Published
Jun 21, 2026 Updated
Not yet rated
4.3 MB File size
Open source
  1. No
DRM-free
  1. Yes
Unobfuscated
  1. Yes
Type
  1. Gameplay
  1. Economy
  1. Shop
Game mode
  1. Survival
  1. Skyblock
  1. Economy
Supported software
  1. Paper
Supported versions
  1. 1.21.11
  1. 1.21.8
  1. 1.21.5
  1. 1.21.4
  1. 1.21.2
  1. 1.21
  1. 1.20
Supported languages
  1. English
  1. Spanish
  1. Russian
  1. German
  1. French
  1. Polish
Creator
Owner
Recommended for you
Christmas Weapons & Tools plugin for Paper 1.21 to 1.21.10 custom items, abilities
5.00 star(s) 1 ratings
10 purchases
Bring Quality Enchanting to Your Community
Not yet rated
8 purchases
A plugin that adds customizable gradient chat colors for players who have donated to the server.
5.00 star(s) 1 ratings
8 purchases
Smart Chat Pings. Player, Area, Global and Role Mentions.
Not yet rated
0 purchases
Modern Teleport Requests. Beautiful GUI. 26 Languages.
Not yet rated
0 purchases
Top