Sueta

Custom Ender Chest

2.1.2

A plugin to open your personal Ender Chest using /ec or /cec, allows you to open/delete/add items and more.

·Plugin

Next-Gen Custom Ender Chest

The ultimate, high-performance, and fully customizable Ender Chest solution for modern servers. Built from the ground up for Paper & Folia.

Overview

Tired of basic Ender Chest plugins that lag your server, lack features, or don't support modern server software? Next-Gen Custom Ender Chest is a complete rewrite of the classic concept, engineered for the strict demands of today's high-performance servers.

Our plugin offers a powerful, flexible, and completely asynchronous experience, ensuring zero lag while providing your players with permission-based Ender Chests. Whether you're running a single server or a vast Velocity proxy network, our multi-storage backend has you completely covered.

⭐ Features

🛡️ Permission-Based Sizes: Easily configure up to 6 different Ender Chest sizes, granted to players dynamically via permission nodes (CustomEnderChest.level.0 to CustomEnderChest.level.5). The chest will automatically resize instantly when their permission changes!

⚡ High-Performance & Asynchronous: All database queries, loading, and saving sequences are handled asynchronously. Your server's TPS will never drop, even with hundreds of players spamming commands.

💾 Flexible Storage System: You choose how to securely store your data!

  • MySQL: Perfect for multi-server networks (BungeeCord/Velocity) to sync player data seamlessly across servers.
  • H2: A fast, high-performance local database for single servers. Offers drastically better TPS than YML with zero setup required.
  • YML: Simple, classic, and manually editable, saving each player's data in a separate file.

🧵 Folia Compatible: Built with the future in mind. Our scheduler and data handling logic are explicitly built for Folia's multi-threaded Region Thread environment!

🎨 Fully Customizable UI: Customize all messages, prefixes, and inventory pop-up titles using the powerful MiniMessage format. Gradients, hex colors, and legacy codes (&c) are all natively supported. Drop-in support for multiple languages (lang_en, lang_vi, etc.).

📦 Dynamic Overflow Protection: If a player's VIP rank expires and their chest is downgraded, items exceeding their new size limit are NOT deleted! They are safely moved into a secure Overflow Storage. Players can manually view and claim these items using the /ec overflow command, or they will automatically be restored back into the Ender Chest when the player upgrades their chest size again. Includes customizable Vault retrieval fees and automatic expiration timers!

👀 Real-Time Admin Sync: Admins can view and interact with any player's Ender Chest in real-time. Any item you put in or take out will instantly mirror directly onto the player's screen!

🔒 Anti-Dupe Data Lock: Robust, thread-safe asynchronous locks guarantee that quit-saving, rapid relogging, and cross-server Bungee transfers are completely immune to item duplication and corruption.

🔄 Database Migration & Stats Validation: Move smoothly between databases (YML <-> H2 <-> MySQL) using the powerful /cec migrate command. Run /cec stats validate to quickly scan and validate the integrity of stored player data!

Commands & Permissions

Click to view Commands & Permissions

Player Commands:

  • /cec - Opens your Ender Chest. (Aliases: /ec, /customenderchest)
  • /cec overflow - Opens your Overflow Storage to retrieve saved items.

General & Interaction Permissions:

  • CustomEnderChest.commands - Allows using command aliases (/cec, /ec, /customec) to open your Ender Chest (needed if allow-command is set to false in config).
  • CustomEnderChest.command.open.self - Allows opening your chest via /cec open.
  • CustomEnderChest.block.open - Allows opening your Ender Chest by right-clicking an Ender Chest block (needed if permission block open is configured).
  • CustomEnderChest.command.overflow - Allows viewing and claiming your overflow items via /cec overflow.

Size Permissions (Levels):

  • CustomEnderChest.level.0 - 9 Slots (1 row)
  • CustomEnderChest.level.1 - 18 Slots (2 rows)
  • CustomEnderChest.level.2 - 27 Slots (3 rows)
  • CustomEnderChest.level.3 - 36 Slots (4 rows)
  • CustomEnderChest.level.4 - 45 Slots (5 rows)
  • CustomEnderChest.level.5 - 54 Slots (6 rows)

Admin Commands & Permissions:

  • /cec open <player> - Open and modify another player's Ender Chest in real-time. (Requires CustomEnderChest.command.open.other)
  • /cec overflow <player> - View and manage another player's overflow items. (Requires CustomEnderChest.command.overflow.other)
  • /cec delete <player> - Delete all items in a specific player's Ender Chest. (Requires CustomEnderChest.command.delete)
  • /cec reload - Reloads the config.yml and language files. (Requires CustomEnderChest.admin)
  • /cec migrate <source> <target> - Migrate all player data from one storage type to another (e.g. yml to mysql). (Requires CustomEnderChest.admin)
  • /cec stats [validate|help] - View database statistics or validate data integrity to detect corruption. (Requires CustomEnderChest.admin)
  • /cec import vanilla - Bulk import vanilla ender chest data for all offline/online players. (Requires CustomEnderChest.admin)
Configuration (config.yml) The plugin is extremely easy to configure. You can control everything from database settings, auto-backups, and physical chest block behaviors to individual sound effects.
# -------------------------------------------------- #
#      Configuration for CustomEnderChest v2.0       #
# -------------------------------------------------- #
# Thank you for using the refactored version!
# All messages, titles, and user-facing text are now managed in the /lang directory.

# General plugin settings
general:
  # Select the language file to use.
  # Example: "en" will load "lang_en.yml", "vi" will load "lang_vi.yml", "zhcn" will load lang_zhcn.yml.
  # Make sure the corresponding file exists in the plugin's /lang folder.
  locale: "en"
  # Set to true to enable debug logging. Useful for troubleshooting.
  debug: false
  # Set to true to enable bStats metrics, which helps the developer understand how the plugin is used.
  # Set to false to disable it.
  bstats-metrics: true
  # Set to true to enable FastStats metrics for error tracking and analytics.
  # Set to false to disable it.
  faststats-metrics: true
  # Enable or disable automatic update checking.
  update-checker: true

# Backup settings
backup:
  # Enable automatic backups of player data
  enabled: true
  # Interval between automatic backups (in minutes)
  interval-minutes: 60
  # Maximum number of backup files to keep
  # Old backups will be automatically deleted when this limit is exceeded
  max-backups: 10
  # Number of days to keep backups (older backups will be deleted)
  retention-days: 7
  # Create a backup when the server shuts down
  backup-on-shutdown: true

# Database settings
storage:
  # Storage type. Options:
  # yml     - Stores data in YAML files, no external setup needed.
  # h2      - (Default & Recommended for single servers) Fast, lightweight, stores data in a single file, no external setup needed.
  # mysql   - (Recommended for multi-server networks) Requires a separate MySQL server.
  type: "h2"

  # The table name that will be used in the database.
  table_name: "custom_enderchests"

  # Periodically auto-save data for online players.
  # This helps minimize data loss in case of a server crash.
  # Time is in seconds.
  auto-save-interval-seconds: 300 # Default is 5 minutes

  # Settings for MySQL (only apply if `type` is "mysql")
  mysql:
    host: "127.0.0.1"
    port: 3306
    database: "enderchest_db"
    username: "user"
    password: "password"
    # Enable/disable SSL encryption for the connection.
    use-ssl: false

  # Settings for the Connection Pool (HikariCP).
  # These settings optimize database connection performance.
  # You generally don't need to change these unless you know what you're doing.
  pool-settings:
    max-pool-size: 10
    min-idle: 5
    connection-timeout: 30000 # 30 seconds

  # Automatically clean up old user data in MySQL
  auto-cleanup:
    # Enable/disable the automatic deletion of inactive player data.
    enabled: false
    # Number of inactive days. Data for players who have been offline for this duration will be deleted.
    inactive-days: 90

  # Automatically migrate data by player name if their UUID changes (e.g. Crack -> Premium).
  # WARNING: Enabling this can allow a cracked player to steal a premium player's items if they change their name.
  # It is recommended to leave this false and contact server staff to transfer data manually if needed.
  # Only enable this if your server move from offline server to online server or you know what you're doing.
  migrate-uuid-by-name: false

# Overflow settings
overflow:
  # Expiration timer for overflow items
  # If enabled, overflow items that are not claimed will be automatically deleted
  expiration:
    enabled: false
    # Number of days before overflow items expire (default: 30)
    days: 30
    # How often to check for expired items (in minutes, default: 60)
    check-interval-minutes: 60
  # Warning shown to players on login if they have overflow items
  login-warning:
    enabled: true
  # Retrieval fees (requires Vault)
  # Charge players when they claim overflow items
  retrieval-fee:
    enabled: false
    # Flat fee charged once when claiming any overflow items (default: 0)
    flat-fee: 0
    # Fee charged per item in overflow (default: 0)
    per-item-fee: 0

# Ender Chest gameplay options
enderchest-options:
  # Disable opening the custom ender chest by right-clicking an Ender Chest block.
  # Useful if you only want players to open the chest via command or players will need
  # "CustomEnderChest.block.open" permission to open via block.
  # Note: If this option is true, don't set true for `disable-plugin-on-endechest-block` below.
  disable-enderchest-click: false
  # Disable the plugin's functionality when interacting with an Ender Chest block.
  # The block will function as a normal vanilla Ender Chest.
  # Useful if you want to reserve the block for vanilla use only.
  # Note: If this option is true, don't set true for `disable-enderchest-click` above.
  vanilla-enderchest-block: false
  # Play the physical lid open/close animation of the Ender Chest block.
  # Note: Disabling this prevents the vanilla ender chest sound from playing,
  # allowing you to hear ONLY the custom sound configured in the `sounds` section.
  play-block-animation: true

# Default settings for players
default-player:
  # Enable this to give players a default chest size.
  # This allows players to use the Ender Chest block without needing a specific permission.
  enabled: true
  # The default chest size (number of slots, must be a multiple of 9, max 54).
  # 27 equals 3 rows, the same as a vanilla Ender Chest.
  # Default permission level is CustomEnderChest.level.3 (27 slots).
  size: 27
  # Allow players to use /cec, /ec, /customec commands by default.
  # If false, players will need "CustomEnderChest.commands" permission to use commands.
  allow-command: true

# Sound customization
sounds:
  # Disable all plugin sounds if set to `true`.
  disable-all: false
  # You can find valid sound names here:
  # https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Sound.html
  # (Use the names from the Enum column)
  open:
    name: "BLOCK_ENDER_CHEST_OPEN"
    volume: 1.0
    pitch: 1.0
  close:
    name: "BLOCK_ENDER_CHEST_CLOSE"
    volume: 1.0
    pitch: 1.0
  fail:
    name: "BLOCK_NOTE_BLOCK_PLING"
    volume: 1.0
    pitch: 0.5
  reload:
    name: "ENTITY_PLAYER_LEVELUP"
    volume: 0.8
    pitch: 1.5
Click to view lang/lang_en.yml
# Prefix used for all messages
prefix: "<gray>[<gradient:#C0FFEE:#B4D0FF>EnderChest</gradient>]</gray> "

messages:
  no-permission: "<red>You don't have permission for that.</red>"
  no-permission-block-open: "<red>You don't have permission to open the Ender Chest by clicking on it.</red>"
  players-only: "<red>This command can only be run by a player.</red>"
  reload-success: "<green>Configuration and language files have been reloaded.</green>"
  data-still-loading: "<yellow>Your data is still loading, please wait a moment...</yellow>"
  data-busy: "<red>Player data is busy. Please try again shortly.</red>"
  save-error: "<red>An error occurred while saving data. Please check the console.</red>"
  invalid-player: "<red>Invalid player name.</red>"

  # Migration messages
  migration-data-incompatible: "<yellow>Warning: Your Ender Chest data is incompatible with the new server version (1.21.5+)."
  migration-data-cleared: "<yellow>Your Ender Chest has been reset due to incompatibility. Old data is still preserved in the database."
  migration-contact-admin: "<gray>Please contact an admin if you need item recovery."
  data-migrated: "<green>Your enderchest data has been migrated to your new account."

  # Overflow messages
  overflow-items-saved: "<yellow>⚠ Some items beyond your permission have been saved to overflow storage."
  overflow-will-restore: "<gray>They will be automatically restored when you upgrade your Ender Chest or using /ec overflow."
  overflow-items-restored: "<green>✓ Restored <count> items from overflow storage!"
  overflow-login-warning: "<yellow>⚠ You have <count> item(s) in overflow storage. Use <command> to claim them."
  overflow-login-warning-expiring: "<yellow>⚠ You have <count> item(s) in overflow that will expire in <days> day(s)! Use <command> to claim them."
  overflow-expired: "<red>Your overflow items (<count> item(s)) have expired and been removed."
  overflow-fee-charged: "<yellow>Charged <amount> for retrieving <count> overflow item(s)."
  overflow-fee-insufficient: "<red>You need at least <amount> to retrieve your overflow items. Balance: <balance>"
  overflow-fee-no-vault: "<red>Economy plugin (Vault) not found. Retrieval fees disabled."

command:
  usage: "<red>Usage: <gray>/<label> <usage>"
  player-not-found: "<red>Player '<player>' not found or has no data."
  delete-usage: "<red>Usage: <gray>/<label> delete <player>"
  delete-success: "<green>Successfully deleted Ender Chest data for <white><player></white>."
  loading-chest: "<yellow>Loading <white><player>'s</white> Ender Chest..."
  import-usage: "<red>Usage: <gray>/<label> import <vanilla>"
  import-invalid-type: "<red>Invalid import type. Use: <gray>vanilla"
  migrate-usage: "<yellow>Usage: <gray>/<label> migrate <yml|h2|mysql> <yml|h2|mysql>"
  migrate-example: "<gray>Example: /<label> migrate yml mysql"
  migrate-running: "<red>Another migration process is currently running. Please wait!"
  migrate-same-type: "<red>Source and target formats cannot be the same."
  migrate-init: "<yellow>Initializing database connection..."
  migrate-conn-source-err: "<red>Error connecting to source format. Migration cancelled."
  migrate-conn-target-err: "<red>Error connecting to target format. Migration cancelled."
  migrate-start: "<yellow>Starting data migration from <source> to <target>..."
  migrate-no-data: "<red>No data found to migrate."
  migrate-success: "<green>Data migration complete! Success: <success>/<total>, Failed: <failed>"
  migrate-note: "<yellow>⚠ Note: <white>To use the migrated data, stop the server, update the storage type in config.yml, then start the server again."
  migrate-error-unknown: "<red>An unknown error occurred during migration. Check Console for details."
  migrate-in-progress: "<red>System is undergoing data maintenance (migration), you cannot open the chest right now!"
  overflow-title: "<dark_purple><player>'s Overflow"
  overflow-admin-title: "<dark_red>Admin Overflow: <white><player>"
  overflow-empty: "<green>You have no items in overflow storage."
  overflow-admin-empty: "<green><player> has no items in overflow storage."
  overflow-no-enderchest: "<red>You need an Ender Chest to claim overflow items."
  overflow-claimed: "<green>✓ Claimed <count> item(s) from overflow!"
  overflow-enderchest-full: "<yellow>Your inventory is full. Remaining items stay in overflow."
  overflow-claim-failed: "<red>Failed to claim overflow items. Please try again."

titles:
  enderchest: "<level> - <light_purple><player>'s Chest"
  admin_view: "<dark_red>Admin View: <white><player>"

levels:
  '0': "&fLevel 1" # 1 row (9 slots)
  '1': "&aLevel 2" # 2 rows (18 slots)
  '2': "&bLevel 3" # 3 rows (27 slots)
  '3': "&eLevel 4" # 4 rows (36 slots)
  '4': "&6Level 5" # 5 rows (45 slots)
  '5': "&d&lLevel 6" # 6 rows (54 slots)

import:
  started: "<green>Starting vanilla ender chest import for all players (online + offline)..."
  complete: "<green>Import complete! <white><imported></white> imported, <white><skipped></white> skipped, <white><failed></white> failed."
  failed-details: "<red>Failed players: <players>"
  nbtapi-missing: "<red>NBTAPI plugin is required for this command. Please install NBTAPI on your server."
Click to view lang/lang_vi.yml
# File Ngôn ngữ Tiếng Việt cho CustomEnderChest

# Prefix dùng cho tất cả messages
prefix: "<gray>[<gradient:#C0FFEE:#B4D0FF>Rương Ender</gradient>]</gray> "

messages:
  no-permission: "<red>Bạn không có quyền để làm điều này.</red>"
  no-permission-block-open: "<red>Bạn không có quyền để mở rương Ender.</red>"
  players-only: "<red>Lệnh này chỉ có thể được thực thi bởi người chơi.</red>"
  reload-success: "<green>Đã tải lại tệp cấu hình và ngôn ngữ.</green>"
  data-still-loading: "<yellow>Dữ liệu của bạn đang được tải, vui lòng chờ trong giây lát...</yellow>"
  data-busy: "<red>Dữ liệu người chơi hiện đang bận. Vui lòng thử lại sau giây lát.</red>"
  save-error: "<red>Đã xảy ra lỗi khi lưu dữ liệu. Vui lòng kiểm tra console.</red>"
  invalid-player: "<red>Tên người chơi không hợp lệ.</red>"

  # Migration messages
  migration-data-incompatible: "<yellow>Cảnh báo: Dữ liệu Rương Ender của bạn không tương thích với phiên bản server mới (1.21.5+)."
  migration-data-cleared: "<yellow>Rương Ender của bạn đã bị reset do không tương thích. Dữ liệu cũ vẫn được lưu trong database."
  migration-contact-admin: "<gray>Vui lòng liên hệ admin nếu cần khôi phục vật phẩm."
  data-migrated: "<green>Dữ liệu rương ender của bạn đã được chuyển sang tài khoản mới."

  # Overflow messages
  overflow-items-saved: "<yellow>⚠ Một số vật phẩm vượt quyền hạn đã được lưu vào kho dự phòng."
  overflow-will-restore: "<gray>Chúng sẽ tự động được khôi phục khi bạn nâng cấp Rương Ender hoặc /ec overflow"
  overflow-items-restored: "<green>✓ Đã khôi phục <count> vật phẩm từ kho dự phòng!"
  overflow-login-warning: "<yellow>⚠ Bạn có <count> vật phẩm trong kho dự phòng. Dùng <command> để nhận."
  overflow-login-warning-expiring: "<yellow>⚠ Bạn có <count> vật phẩm trong kho dự phòng sẽ hết hạn sau <days> ngày! Dùng <command> để nhận."
  overflow-expired: "<red>Vật phẩm dự phòng (<count> vật phẩm) đã hết hạn và bị xóa."
  overflow-fee-charged: "<yellow>Đã trừ <amount> khi nhận <count> vật phẩm dự phòng."
  overflow-fee-insufficient: "<red>Bạn cần ít nhất <amount> để nhận vật phẩm dự phòng. Số dư: <balance>"
  overflow-fee-no-vault: "<red>Không tìm thấy plugin kinh tế (Vault). Phí nhận vật phẩm đã tắt."

command:
  usage: "<red>Sử dụng: <gray>/<label> <usage>"
  player-not-found: "<red>Không tìm thấy người chơi '<player>' hoặc họ chưa có dữ liệu."
  delete-usage: "<red>Sử dụng: <gray>/<label> delete <tên_người_chơi>"
  delete-success: "<green>Đã xóa thành công dữ liệu Rương Ender của <white><player></white>."
  loading-chest: "<yellow>Đang tải Rương Ender của <white><player></white>..."
  import-usage: "<red>Sử dụng: <gray>/<label> import <vanilla>"
  import-invalid-type: "<red>Loại import không hợp lệ. Sử dụng: <gray>vanilla"
 

Similar projects

Plugin →