Premium Container Protection Plugin for Minecraft Servers
Cross-platform compatible • Java & Bedrock Edition support • Advanced features[/center]
Table of Contents
1. Overview
2. Features
3. Installation
4. Commands
5. Permissions
6. Configuration
7. Database Setup
8. Cross-Platform Support
9. Integrations
10. API Documentation
11. Troubleshooting
12. Changelog
Overview
PrivateChestPlus is a premium Minecraft plugin designed to provide comprehensive container protection for Spigot/Paper servers. It offers advanced security features, cross-platform compatibility, and seamless integration with popular plugins.
Key Highlights
- UUID-based ownership - Survives player name changes
- Cross-platform support - Works with both Java and Bedrock players
- Multiple storage backends - YAML and MySQL support
- Advanced GUI system - Touch-friendly for mobile players
- Container limits - Granular per-type limitations
- Economy integration - Vault support with customizable costs
- Multiple integrations - WorldGuard, Lands, AdvancedChests, and more
✨ Features
Core Protection Features
- Multi-container support: Chests, Barrels, Shulker Boxes, Hoppers, Furnaces, Dispensers, Droppers, Brewing Stands, and more
- Double chest protection: Full support for double chests with shared ownership
- Anti-grief protection: Prevents hopper extraction, piston movement, and explosive damage
- Temporary unlocking: Auto-relock system with configurable duration
- Permanent unprotection: Complete removal of container protection
Advanced Features (v1.6+)
- Container Limits: Granular per-player, per-container-type limitations
- Enhanced Teleportation: Safe teleportation with distance and world restrictions
- Auto-protection: Automatic container protection when placed (optional)
- Container Cleanup: Automatic removal of orphaned protections
- Performance Caching: In-memory caching with TTL for optimal performance
Cross-Platform Features
- Geyser/Floodgate integration: Enhanced Bedrock player support
- Platform detection: Automatic optimization based on player platform
- Touch-friendly GUIs: Optimized interfaces for mobile players
- Cross-platform sharing: Full compatibility between Java and Bedrock players
Management Features
- GUI-based management: Interactive container management interface
- Sharing system: Share container access with other players
- Teleportation system: Quick travel to protected containers
- Admin tools: Bulk operations and debugging utilities
Installation
Requirements
- Server Software: Spigot 1.16.5+ or Paper (recommended)
- Java Version: Java 8 or higher
- Memory: Minimum 512MB RAM allocated to server
Installation Steps
1.
Download the latest PrivateChestPlus JAR file
2.
Place the JAR file in your server's
/plugins folder
3.
Restart your server to generate configuration files
4.
Configure the plugin settings in
/plugins/PrivateChestPlus/config.yml
5.
Reload the plugin with
/privatechest or restart the server
Optional Dependencies
- Vault: Required for economy features
- WorldGuard: For region-based protection
- Lands: For land claim integration
- AdvancedChests: For special chest type support
- Geyser/Floodgate: For enhanced Bedrock support
- PlaceholderAPI: For placeholder support
Commands
Player Commands
/lockchest |
Protect the targeted container |
privatechest.lock |
/lockchest |
/unlockchest |
Temporarily unlock a protected container |
privatechest.unlock |
/unlockchest |
/unprotectchest |
Permanently remove container protection |
privatechest.unprotect |
/unprotectchest |
/chestshare <player> |
Share container access with another player |
privatechest.share |
/chestshare Steve |
/mychests |
View and manage protected containers |
privatechest.mychests |
/mychests |
/mychests tp <id> |
Teleport to a specific container |
privatechest.mychests.teleport |
/mychests tp 5 |
/containerlimits |
View container limits and usage |
privatechest.use |
/containerlimits |
Administrative Commands
/privatechest |
Reload plugin configuration |
privatechest.reload |
/privatechest |
/clearchests |
Remove orphaned container protections |
privatechest.admin |
/clearchests |
/containerlimits clear <player> |
Clear a player's container limits |
privatechest.admin |
/containerlimits clear Steve |
/containerlimits stats |
View global container statistics |
privatechest.admin |
/containerlimits stats |
Command Aliases
- /clearchests → /clearchest
- /containerlimits → /climit, /limits
Permissions
Basic Permissions
privatechest.lock |
Allow protecting containers |
true |
privatechest.unlock |
Allow temporarily unlocking containers |
true |
privatechest.unprotect |
Allow permanently unprotecting containers |
true |
privatechest.share |
Allow sharing container access |
true |
privatechest.mychests |
Allow viewing protected containers |
true |
privatechest.use |
Basic plugin usage |
true |
privatechest.reload |
Allow reloading plugin configuration |
op |
Administrative Permissions
privatechest.admin |
Full admin access to all features |
op |
privatechest.admin.bypass |
Bypass all container protections |
op |
privatechest.admin.share |
Share any player's containers |
op |
privatechest.admin.unprotect |
Unprotect any container |
op |
Container Limit Permissions
Container limits use a dynamic permission system:
- Format: privatechest.limit.{container_type}.{amount}
- Examples:
- privatechest.limit.chest.10 - Allow 10 chests
- privatechest.limit.barrel.5 - Allow 5 barrels
- privatechest.limit.chest.unlimited - Unlimited chests
Supported Container Types
- chest - Regular and double chests
- barrel - Barrels
- shulker_box - All colored shulker boxes
- hopper - Hoppers
- dispenser - Dispensers
- dropper - Droppers
- brewing_stand - Brewing stands
- furnace - Regular furnaces
- blast_furnace - Blast furnaces
- smoker - Smokers
Teleportation Permissions
privatechest.teleport |
Allow teleporting to containers |
true |
privatechest.teleport.bypass |
Bypass teleportation restrictions |
op |
privatechest.teleport.crossworld |
Allow cross-world teleportation |
true |
privatechest.teleport.bypass-cooldown |
Bypass teleportation cooldown |
op |
privatechest.teleport.bypass-distance |
Bypass distance limits |
op |
Integration Permissions
privatechest.integration.worldguard |
Use WorldGuard features |
true |
privatechest.integration.lands |
Use Lands features |
true |
privatechest.integration.advancedchests |
Protect AdvancedChests |
true |
privatechest.integration.towns-and-nations |
Use Towns and Nations features |
true |
privatechest.integration.bypass |
Bypass integration restrictions |
op |
Cross-Platform Permissions
privatechest.crossplatform |
Access cross-platform features |
true |
privatechest.crossplatform.bedrock |
Bedrock-specific optimizations |
true |
⚙️ Configuration
The main configuration file is located at
/plugins/PrivateChestPlus/config.yml.
Storage Configuration
Code (Text):
storage:
type: yaml # Options: yaml, mysql
mysql:
host: localhost
port: 3306
database: privatechestplus
username: root
password: yourpassword
table: protected_chests
ssl: false
# Connection Pool Settings
pool:
min-size: 2
max-size: 10
connection-timeout: 30000
validation-timeout: 5000
General Settings
Code (Text):
use-prefix: true
prefix: "&7[&6PrivateChestPlus&7] "
allow-double-chests: true
unlock-duration: 30 # Time in seconds for temporary unlock
allow-shared-access: true
target-distance: 5 # Maximum distance for targeting containers
Container Limits
Code (Text):
container-limits:
enabled: true
default-limits:
chest: 5
barrel: 3
shulker_box: 2
hopper: 1
furnace: 2
permission-format: "privatechest.limit.%type%.%amount%"
Teleportation Settings
Code (Text):
teleportation:
enabled: true
safety-checks:
check-safe-location: true
check-world-loaded: true
check-chunk-loaded: true
restrictions:
max-distance: 0 # 0 = no limit
same-world-only: false
cooldown: 0 # Cooldown in seconds
Cross-Platform Settings
Code (Text):
cross-platform:
bedrock-optimizations: true
floodgate:
prefix: "."
enhanced-name-resolution: true
gui:
bedrock-simple-materials: true
bedrock-short-titles: true
touch-interface-hints: true
Economy Settings
Code (Text):
economy:
enabled: false
cost-to-protect: 50.0
cost-to-teleport: 10.0
cost-to-share: 25.0
cost-to-rename: 15.0
cost-to-remove: 5.0
currency-symbol: "$"
# Platform-specific settings
platform-specific:
bedrock-cost-multiplier: 1.0
bedrock-economy-enabled: true
Protection Settings
Code (Text):
protection:
auto-protect-on-place: false # Auto-protect when placing containers
anti-hopper:
enabled: true
prevent-placement-near-containers: true
prevent-piston-interaction: true
prevent-dispenser-interaction: true
redstone:
allow-redstone-power: true
log-interactions: false
️ Database Setup
YAML Storage (Default)
YAML storage is the default option and requires no additional setup. Data is stored in
/plugins/PrivateChestPlus/data.yml.
Advantages:
- No external dependencies
- Easy to backup and restore
- Human-readable format
Disadvantages:
- Limited scalability for large servers
- Slower performance with many protected containers
MySQL Storage
For larger servers, MySQL is recommended for better performance and scalability.
MySQL Setup Steps
1.
Create Database:
Code (Text):
CREATE DATABASE privatechestplus CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
2.
Create User:
Code (Text):
CREATE USER 'privatechest'@'localhost' IDENTIFIED BY 'secure_password';
GRANT ALL PRIVILEGES ON privatechestplus.* TO 'privatechest'@'localhost';
FLUSH PRIVILEGES;
3.
Configure Plugin:
Code (Text):
storage:
type: mysql
mysql:
host: localhost
port: 3306
database: privatechestplus
username: privatechest
password: secure_password
table: protected_chests
ssl: false
4.
Restart Server - The plugin will automatically create the required tables.
Database Schema
The plugin creates the following table structure:
Code (Text):
CREATE TABLE protected_chests (
id INT AUTO_INCREMENT PRIMARY KEY,
world VARCHAR(100) NOT NULL,
x INT NOT NULL,
y INT NOT NULL,
z INT NOT NULL,
owner_uuid VARCHAR(36) NOT NULL,
container_type VARCHAR(50) NOT NULL,
protected_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
last_accessed TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
shared_players TEXT,
UNIQUE KEY location_key (world, x, y, z)
);
Cross-Platform Support
PrivateChestPlus provides comprehensive support for both Java and Bedrock Edition players through Geyser and Floodgate integration.
Geyser Integration
Geyser allows Bedrock Edition players to join Java Edition servers. PrivateChestPlus automatically detects Geyser and provides optimized experiences.
Features:
- Automatic platform detection
- Optimized GUI materials for Bedrock compatibility
- Touch-friendly interface messages
- Mobile-optimized sound effects
Floodgate Integration
Floodgate provides enhanced authentication for Bedrock players. When detected, PrivateChestPlus enables advanced features.
Features:
- Enhanced player name resolution
- Bedrock player prefix support (usually . or *)
- Cross-platform player validation
- Improved sharing between Java and Bedrock players
Cross-Platform Features
GUI Optimizations
- Bedrock-friendly materials: Uses simple, compatible materials
- Shorter titles: Respects Bedrock's 32-character title limit
- Touch interface hints: Provides mobile-friendly instructions
Sharing System
- Cross-platform compatibility: Java and Bedrock players can share containers
- Player validation: Handles different naming conventions
- Platform detection: Shows player platform in sharing interfaces
Sound System
- Fallback sounds: Uses compatible sounds for Bedrock players
- Volume adjustment: Optimized for mobile devices
- Platform-specific effects: Different effects based on player platform
Configuration for Cross-Platform
Code (Text):
cross-platform:
bedrock-optimizations: true
floodgate:
prefix: "." # Usually "." for Floodgate
enhanced-name-resolution: true
gui:
bedrock-simple-materials: true
bedrock-short-titles: true
touch-interface-hints: true
sounds:
bedrock-fallbacks: true
mobile-volume-adjustment: 0.8
Integrations
PrivateChestPlus supports integration with popular plugins to enhance functionality and compatibility.
Vault Integration
Purpose: Economy features and permissions management
Features:
- Configurable costs for protection actions
- Support for any Vault-compatible economy plugin
- Platform-specific cost multipliers
- Bypass permissions for admin users
Setup:
1. Install Vault and a compatible economy plugin
2. Enable economy features in config:
Code (Text):
economy:
enabled: true
cost-to-protect: 50.0
cost-to-teleport: 10.0
WorldGuard Integration
Purpose: Region-based protection control
Features:
- Respect WorldGuard regions for container protection
- Require region membership for protection
- Build flag checking
- Global region support
Configuration:
Code (Text):
integrations:
worldguard:
enabled: true
respect-regions: true
require-membership: false
check-build-flag: true
Permissions:
- privatechest.integration.worldguard - Access WorldGuard features
Lands Integration
Purpose: Land claim system compatibility
Features:
- Respect Lands claims for protection
- Land membership requirements
- Wilderness protection control
- Flag-based permission checking
Configuration:
Code (Text):
integrations:
lands:
enabled: true
respect-claims: true
require-membership: false
allow-wilderness: true
check-flags: true
AdvancedChests Integration
Purpose: Support for special chest types
Features:
- Protection of AdvancedChests containers
- Preservation of advanced features
- Enhanced protection messages
- Compatibility with AdvancedChests GUI
Configuration:
Code (Text):
integrations:
advancedchests:
enabled: true
show-protection-messages: true
allow-protection: true
Towns and Nations Integration
Purpose: Town/nation-based protection and sharing
Features:
- Territorial protection rules
- Diplomatic sharing system
- Nation-wide container access
- War-time protection mechanics
- Administrative town management
Configuration:
Code (Text):
integrations:
towns-and-nations:
enabled: true
territorial-rules:
respect-claims: true
require-membership: false
allow-wilderness: true
diplomatic-sharing:
allies: true
neutral: false
enemies: false
nation-features:
allow-nation-sharing: true
nation-wide-access: false
war-protection:
enabled: true
disable-sharing-during-war: true
allow-enemy-access: false
PlaceholderAPI Integration
Purpose: Placeholder support for other plugins
Available Placeholders:
- %privatechestplus_chests% - Number of protected chests
- %privatechestplus_shared% - Number of shared containers
- %privatechestplus_limit_chest% - Chest limit for player
- %privatechestplus_used_chest% - Chests used by player
API Documentation
PrivateChestPlus provides a comprehensive API for integration with other plugins.
Getting the API Instance
Code (Text):
// Get API through ServicesManager
PrivateChestPlusAPI api = Bukkit.getServicesManager()
.getRegistration(PrivateChestPlusAPI.class)
.getProvider();
API Methods
Container Protection Status
Code (Text):
/**
* Check if a container is protected
* @param location Container location
* @return true if protected, false otherwise
*/
boolean isChestProtected(Location location);
/**
* Get the owner of a protected container
* @param location Container location
* @return UUID of owner, or null if not protected
*/
UUID getChestOwner(Location location);
Protection Management
Code (Text):
/**
* Protect a container for a specific owner
* @param location Container location
* @param owner UUID of the owner
*/
void lockChest(Location location, UUID owner);
/**
* Remove protection from a container
* @param location Container location
*/
void unlockChest(Location location);
Access Control
Code (Text):
/**
* Check if a player can access a container
* @param player Player to check
* @param location Container location
* @return true if player can access, false otherwise
*/
boolean canAccessChest(Player player, Location location);
API Usage Examples
Example 1: Check Protection Status
Code (Text):
public class MyPlugin extends JavaPlugin {
private PrivateChestPlusAPI chestAPI;
@Override
public void onEnable() {
// Get API instance
chestAPI = Bukkit.getServicesManager()
.getRegistration(PrivateChestPlusAPI.class)
.getProvider();
if (chestAPI == null) {
getLogger().warning("PrivateChestPlus not found!");
return;
}
}
public boolean isChestSafe(Location location) {
return chestAPI.isChestProtected(location);
}
}
Example 2: Automatic Protection
Code (Text):
@EventHandler
public void onChestPlace(BlockPlaceEvent event) {
Block block = event.getBlock();
Player player = event.getPlayer();
// Check if it's a chest and player has VIP rank
if (block.getType() == Material.CHEST && player.hasPermission("myserver.vip")) {
// Automatically protect the chest
chestAPI.lockChest(block.getLocation(), player.getUniqueId());
player.sendMessage("§aYour chest has been automatically protected!");
}
}
Example 3: Custom Protection Command
Code (Text):
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (!(sender instanceof Player)) return true;
Player player = (Player) sender;
Block targetBlock = player.getTargetBlock(null, 5);
if (targetBlock.getType() == Material.CHEST) {
Location loc = targetBlock.getLocation();
if (chestAPI.isChestProtected(loc)) {
UUID owner = chestAPI.getChestOwner(loc);
player.sendMessage("§cChest is protected by: " + Bukkit.getOfflinePlayer(owner).getName());
} else {
chestAPI.lockChest(loc, player.getUniqueId());
player.sendMessage("§aChest protected successfully!");
}
}
return true;
}
API Events
The plugin fires custom events that other plugins can listen to:
Code (Text):
// Container protection event
@EventHandler
public void onChestProtect(ChestProtectEvent event) {
Player player = event.getPlayer();
Location location = event.getLocation();
// Handle protection event
}
// Container access event
@EventHandler
public void onChestAccess(ChestAccessEvent event) {
Player player = event.getPlayer();
Location location = event.getLocation();
boolean hasAccess = event.hasAccess();
// Handle access event
}
GUI System
PrivateChestPlus features an advanced GUI system optimized for both Java and Bedrock players.
MyChests GUI
The main container management interface accessible via
/mychests.
Features:
- Paginated container listing
- One-click teleportation
- Temporary unlock functionality
- Container sharing management
- Cross-platform optimized
Navigation:
- Left-click: Teleport to container
- Right-click: Open container menu
- Shift-click: Quick unlock (temporary)
Sharing GUI
Interactive interface for managing container sharing.
Features:
- Player search and selection
- Online/offline player support
- Cross-platform player names
- Share removal functionality
Container Menu
Per-container management options.
Available Actions:
- Teleport to container
- Temporarily unlock
- Share with players
- Remove protection
- View container information
️ Troubleshooting
Common Issues
1. Containers Not Protecting
Symptoms:
- /lockchest doesn't work
- No protection messages appear
Solutions:
- Check player has privatechest.lock permission
- Verify player is looking at a supported container type
- Check target distance setting in config
- Ensure no integration conflicts (WorldGuard, Lands)
2. MySQL Connection Issues
Symptoms:
- "Database connection failed" errors
- Plugin disables on startup
Solutions:
- Verify MySQL credentials in config
- Check MySQL server is running
- Ensure database exists and user has permissions
- Check firewall settings if using remote MySQL
3. Cross-Platform Issues
Symptoms:
- Bedrock players can't access GUIs
- Player names not resolving correctly
Solutions:
- Ensure Geyser/Floodgate is properly installed
- Check Floodgate prefix configuration
- Verify cross-platform settings are enabled
- Update to latest versions of all plugins
4. Performance Issues
Symptoms:
- Server lag when accessing containers
- Slow GUI loading
Solutions:
- Enable caching in configuration
- Consider switching to MySQL for large servers
- Adjust cache settings and TTL values
- Monitor server resources
Debug Mode
Enable debug logging to troubleshoot issues:
Code (Text):
debug:
cache-stats: true
database-stats: true
cross-platform-detection: true
log-platform-detection: true
log-container-limits: true
log-sharing-activity: true
Log File Analysis
Common log patterns and their meanings:
Code (Text):
[INFO] ✅ PrivateChestPlus v1.8.1 enabled.
→ Plugin loaded successfully
[WARNING] ⚠️ Vault not found or no economy plugin available.
→ Economy features disabled (install Vault + economy plugin)
[INFO] Cross-Platform Support Detected:
→ Geyser/Floodgate found, cross-platform features active
[ERROR] Failed to connect to MySQL database
→ Check MySQL configuration and connection
Performance Monitoring
Monitor plugin performance with:
Code (Text):
/privatechest stats # Basic statistics
/containerlimits stats # Container usage statistics
Changelog
Version 1.8.1 (Latest)
Bug Fixes:
- Fixed ghost container icons in /mychests GUI
- Resolved share GUI input not working in Java edition
- Added missing import statements causing compilation errors
- Fixed cache cleanup in ChestLocker.unprotectChest() method
✨ New Features:
- Auto-protection feature for containers placed by players
- Enhanced container validation with isValidContainer() method
- Automatic cleanup of orphaned protections
- Improved Bedrock GUI with player filtering
⚡ Improvements:
- Enhanced cache system with comprehensive cleanup
- Better error handling in chat input validation
- Improved inventory close event handling
- Added debug configuration options for container cleanup
Version 1.8.0
New Integrations:
- Towns and Nations integration with diplomatic features
- Enhanced WorldGuard integration with region flags
- Improved Lands integration with role-based permissions
✨ Features:
- Nation-wide container sharing
- War-time protection mechanics
- Diplomatic sharing rules (allies, neutral, enemies)
- Administrative town management features
Version 1.7.0
Cross-Platform Enhancements:
- Full Geyser and Floodgate integration
- Bedrock-optimized GUI system
- Touch-friendly interface improvements
- Cross-platform player name resolution
⚡ Performance:
- Advanced caching system with TTL
- Database connection pooling
- Memory usage optimizations
Version 1.6.0
Container Limits:
- Granular per-player, per-container-type limits
- Permission-based limit system
- Usage tracking and statistics
Enhanced Teleportation:
- Safety checks for teleportation destinations
- Distance and world restrictions
- Cooldown system
- Cross-world teleportation support
Version 1.5.0
Core Improvements:
- MySQL support with connection pooling
- Enhanced API for plugin developers
- Improved error handling and logging
- Better integration support
Version 1.4.0
⚙️ Advanced Features:
- Performance caching system
- Debug and monitoring tools
- Enhanced configuration options
- Stability improvements
Support
Getting Help
1.
Documentation: Check this documentation first
2.
Configuration: Verify your config.yml settings
3.
Logs: Check server logs for error messages
4.
Permissions: Ensure players have correct permissions
5.
Updates: Make sure you're using the latest version
Reporting Issues
When reporting issues, please provide:
- Server version (Spigot/Paper version)
- Plugin version
- Configuration files (config.yml, messages.yml)
- Relevant server logs
- Steps to reproduce the issue
- List of other plugins installed
Community Resources
- Discord: Join our community Discord server
- GitHub: Report bugs and feature requests
- Wiki: Comprehensive online documentation
License
PrivateChestPlus is a premium plugin. All rights reserved.
Terms of Use:
- Licensed for use on servers you own or have explicit permission to administrate
- Redistribution is prohibited
- Reverse engineering is prohibited
- Commercial use requires appropriate licensing
Credits
Development Team:
- Koyere Dev - Lead Developer and Plugin Author
Special Thanks:
- Beta testers and community members
- Plugin integration partners
- Contributors to the documentation
Third-Party Libraries:
- HikariCP for database connection pooling
- bStats for anonymous usage statistics
© 2025 Koyere Dev. All rights reserved. PrivateChestPlus is a premium Minecraft plugin.
End of Documentation
For the latest updates and announcements, visit our official channels and keep your plugin updated to the latest version.