LockTight
PluginLicenseRef-All-Rights-Reserved

LockTight

A Minecraft plugin that provides comprehensive chest locking, protection, and management features with GriefDefender & Vault integration.

496
Downloads
1
Followers
3 months ago
Updated
📦
20
Versions

📖About LockTight

Locktight - Advanced Chest Protection & Security System

Locktight transforms chest security from a simple protection mechanism into an engaging, strategic gameplay element that enhances both security-focused and raid-style server experiences.

THIS PLUGIN IS STILL IN DEVELOPMENT, IT IS AVAILABLE CURRENTLY IN BETA VERSION TO HELP DEVELOPMENT THROUGH COMMUNITY FEEDBACK, DO NOT EXPECT IT TO BE PERFECT OR FREE OF BUGS. IF YOU RUN INTO ISSUES, BE SURE YOU ARE RUNNING THE LATEST BUILD FIRST, THEN REPORT THE ISSUE IN #PLUGIN-HELP IN THE DISCORD.

NOTE: IF EXPERIENCING PERFORMANCE ISSUES BECAUSE OF LOCKTIGHT, USE LATEST RELEASE. VERSIONS ALPHA 1.0.4 - 1.0.9 HAD KNOWN PERFORMANCE ISSUES DUE TO HOPPER HEAVY TASKS. Be wary of hopper heavy bases, due to the logic that prevents hoppers stealing from locked chests. Tests show new logic as of A1.1.0 to be 94% more efficient in terms of server thread usage. Please report any issues in the provided Discord channel for support.

Overview

Locktight is a comprehensive chest protection plugin designed to provide an additional layer of security for chests within land claims while maintaining flexibility for various server types. Perfect for both claim-based and raid-style servers, Locktight offers sophisticated chest locking mechanisms, configurable trust systems, and an engaging lockpicking gameplay element.

How to Use

  • Simply look at the chest you wish to lock and execute /chest lock
  • Purchase lockpicks & lock reinforcements by executing /chest shop
  • AS OF 1.0.6, CHESTS ARE AUTO LOCKED ON PLACEMENT (CONFIGURABLE) - DEFUALT VALUE CHANGED TO FALSE IN 1.1.4

⚙️ Configuration

Main Configuration (config.yml)

# Locktight Configuration File
# Config version - do not modify
config_version: 2

#Happy Configuring!

# General Settings
general:
  # Auto-lock chests when placed by players
  auto_lock_on_place: false
  
  # Check for updates on startup
  check_updates: true

  # Close shop GUI after making a purchase
  close_gui_after_purchase: false
  
  # Chest lock expiration settings
  # How many days before a chest lock expires (default: 14 days)
  # Note: This time resets on every logout, similar to GD claim expiration-
  # this ensures the database isnt crowded with old locks from inactive players
  chest_lock_expiration_days: 14
  
  # How often to check for expired chest locks (in hours, default: 6 hours)
  # Note: This is a safety net - chest locks are automatically removed immediately when they expire
  # This periodic cleanup ensures database health and handles any edge cases
  chest_lock_cleanup_interval_hours: 6
  
  # Enable debug logging for troubleshooting
  debug_enabled: false
  
  # Enable hopper-specific debug logging (separate from general debug)
  # This prevents hopper debug spam when general debug is enabled
  hopper_debug: false

# Lockpicking System Settings
lockpicking:
  # Enable/disable lockpicking system
  enabled: true
  
  # Temporary access duration in seconds (from lockpicking)
  temporary_access_seconds: 60
  
  # Success rates for different lockpick tiers (as decimal values)
  # 0.005 = 0.5%, 0.05 = 5%, 0.1 = 10%, etc.
  success_rates:
    weak: 0.005      # 0.5% success rate
    medium: 0.05     # 5% success rate
    advanced: 0.1    # 10% success rate
    professional: 0.3 # 30% success rate
    mythical: 1.0    # 100% success rate
  
  # Alert system settings
  alerts:
    # Enable/disable lockpick alert system
    enabled: true
    # Default alert state for new players (true = alerts enabled, false = alerts disabled)
    default_enabled: true
  
  # Offline player protection
  # When false, players cannot lockpick chests owned by offline players (default: true)
  # This prevents players from being robbed while offline
  allow_lockpicking_offline_players: true

# Lock Reinforcement System Settings
reinforcement:
  # Enable/disable lock reinforcement system
  enabled: true
  
  # Percentage increase in lockpicking resistance (as decimal value)
  # 0.05 = 5% increase in resistance (5% decrease in lockpick success rate)
  resistance_increase: 0.05
  
  # Maximum number of reinforcements that can be applied to a single chest
  # Each reinforcement increases resistance by resistance_increase
  # Example: 3 reinforcements with 0.05 resistance = 15% total resistance
  max_reinforcements: 8
  
  # Number of lockpicking attempts before reinforcements degrade
  # After this many attempts, reinforcements are reduced by 1
  # Set to 0 to disable automatic degradation
  attempts_per_degradation: 5

# World Blacklist Settings
world_blacklist:
  # Enable/disable world blacklist feature
  enabled: false
  
  # List of worlds where chest locking is prohibited
  # Admin locks can still be placed in blacklisted worlds
  # Add world names here to blacklist them
  blacklisted_worlds: []

# Sound Effects Settings
sound_effects:
  # Enable/disable anvil sound effects (reinforcement)
  anvil_sounds:
    enabled: true
  
  # Enable/disable villager no sound effects (lockpicking)
  villager_no_sounds:
    enabled: true

# Bypass Permission Settings
bypass_permission:
  # Make players with locktight.bypass permission have locks that never expire
  locks_never_expire:
    enabled: true

# GriefDefender Integration Settings
griefdefender:
  # Allow claim owners to unlock/access any locked chest inside their claim
  # This gives claim owners full control over chests in their territory
  allow_claim_owner_unlock_all: true
  
  # Trust types that can lock chests in claims
  # BUILDER - Can build and lock chests
  # CONTAINER - Can access containers and lock chests  
  # MANAGER - Administrative control, can lock chests
  allowed_trust_types:
    - "BUILDER"
    - "CONTAINER" 
    - "MANAGER"
  
  # Wilderness and public area handling
  # Allow chest locking in wilderness areas (unclaimed land)
  allow_wilderness_locking: true

# Economy Settings. Requires Vault
economy:
  # Currency symbol for messages
  currency_symbol: "$"

# Performance Optimization Settings
performance:
  # Cache TTL in seconds (how long before refreshing from DB)
  # Default: 300 (5 minutes) - only change if you have issues
  # Higher values = better performance but potentially stale data
  cache_ttl_seconds: 300
  
  # Maximum cache size (LRU eviction)
  # Default: 10000 - only increase if you have many locked chests
  # Each entry uses ~100 bytes, so 10000 = ~1MB memory
  cache_max_size: 10000
  
  # Emergency disable cache if issues arise (default: false)
  # Only use for troubleshooting - will cause major performance loss
  # WARNING: Disabling cache will significantly impact server performance with hoppers
  disable_cache: false

Messages (messages.yml)

Customize all plugin messages, colors, and formatting.

GUI Configuration (gui.yml)

Configure shop appearance, colors, and item layouts.

Key Features

🛡️ Enhanced Claim Security

Locktight integrates seamlessly with GriefDefender to provide a second layer of protection beyond standard claim trusts. Players with claim access cannot automatically open locked chests unless explicitly trusted through the /chest trust command. This ensures that even trusted players must be specifically authorized for individual chest access.

🔐 Intelligent Chest Locking

  • Owner-Only Access: Locked chests are completely secure from unauthorized access
  • Indestructible Protection: Locked chests cannot be broken by hand or destroyed by explosions
  • Claim Integration: Respects existing claim boundaries and trust levels
  • Configurable Permissions: Server owners can define which trust levels (CONTAINER, BUILDER, MANAGER) can lock chests within claims

🎯 Advanced Trust Management

The plugin's sophisticated trust system allows claim owners to maintain full control over their locked chests while enabling trusted players to create their own secure storage within the claim. This creates a balanced ecosystem where security and collaboration coexist.

🎮 Engaging Lockpicking System

Perfect for raid-style servers, Locktight features a configurable lockpicking mechanic that adds excitement and strategy to chest security:

  • Multiple Tiers: Weak, Medium, Advanced, Professional, and Mythical lockpicks
  • Configurable Success Rates: Server owners can balance gameplay and security
  • In-Game Shop: Players can purchase lockpicks using Vault economy integration
  • Reinforcement System: Chest owners can reinforce locks to reduce lockpicking success rates

⚙️ Flexible Configuration

Locktight adapts to various server environments:

  • Claim-Based Servers: Enhanced security within existing land claim systems
  • Raid Servers: Configurable wilderness locking and lockpicking mechanics
  • Hybrid Servers: Balance between protection and raiding gameplay

Server Types

🏰 Claim-Based Protection Servers

For servers using GriefDefender, Locktight integrates seamlessly to provide an additional security layer that respects existing claim boundaries while adding chest-specific protection. The plugin automatically detects claim ownership, respects trust levels, and ensures that players with appropriate claim permissions (configurable) can lock chests within their trusted areas. This creates a harmonious relationship between land protection and chest security.

⚔️ Raid-Style Servers

Perfect for servers without land claiming systems, Locktight offers wilderness chest locking and an engaging lockpicking system that enhances raiding gameplay.

🔄 Hybrid Servers

Servers can configure Locktight to balance protection and raiding elements, creating a dynamic environment where both security and adventure coexist. Say you have an admin claim that needs public chest access, but you want to keep certain items admin accessible only. Lock a chest, good to go.

Technical Features

  • SQLite Database: Reliable data storage for chest locks and trust relationships
  • Vault Integration: Seamless economy integration for the lockpick shop
  • GriefDefender API: Direct integration for optimal performance and compatibility
  • Configurable Expiration: Automatic cleanup of abandoned chest locks
  • Double Chest Support: Automatic handling of connected chest storage

Benefits

  • Enhanced Security: Additional protection layer beyond standard claim systems
  • Balanced Gameplay: Security features that don't totally compromise server dynamics
  • Player Engagement: Interactive lockpicking system adds excitement
  • Server Flexibility: Adapts to various server types and playstyles
  • Professional Quality: Robust, well-tested codebase with comprehensive features

🔑 Permissions & Commands

All Permission Nodes

Permission Description Default Access
locktight.use Basic chest operations + inspect own chests + delete own chests true All players
locktight.shop Access the lockpick shop true All players
locktight.lockpick Use lockpicks on chests op Admins only
locktight.lockpickget Get lockpick items via command op Admins only
locktight.reload Reload plugin configuration op Admins only
locktight.cleanup Manually trigger cleanup op Admins only
locktight.* Wildcard permission for all plugin features op Admins only
locktight.bypass Bypass all chest locks and restrictions + inspect any chest op Admins only

All Commands

Command Description Permission
/chest lock Lock a chest locktight.use
/chest unlock Unlock your chest locktight.use
/chest trust <player> Trust a player on chest locktight.use
/chest delete Delete chest data locktight.use (own) or locktight.bypass (any)
/chest inspect Inspect any chest locktight.use (own) or locktight.bypass (any)
/chest shop Open lockpick shop locktight.shop
/chest reload Reload configuration locktight.reload
/chest cleanup Clean expired locks locktight.cleanup
/chest lockpick Use lockpick on chest locktight.lockpick
/chest lockpickget <tier> Get lockpick items locktight.lockpickget

Permission Logic Notes

  • Inspect Command: Players with locktight.use can inspect their own chests, players with locktight.bypass can inspect any chest
  • Delete Command: Players with locktight.use can delete their own chests, players with locktight.bypass can delete any chest
  • Bypass Permission: locktight.bypass overrides all restrictions and allows full access to any chest

📋 TODO / Future Improvements

Planned Features

  • Modular Lockpick System: Make the lockpick system fully modular - allow server owners to add custom lockpick tiers via gui.yml and config.yml without requiring code changes. Currently, new lockpick tiers can be added to the shop GUI, but they won't function as lockpicks due to hardcoded tier detection logic.
  • Lockable Doors: Make doors lockable (doors, trapdoors, etc.)
  • Lockable Redstone Blocks: Make redstone signal blocks lockable (buttons, levers, pressure plates)
  • Lockable Barrels: Make barrels lockable
  • Lockable Enderchests: Make enderchests lockable
  • Lockable Chest Variants (maybe?): Make chest variants like boat chests/railcart chests lockable

All suggestions welcome!