▶️ ЗАБЕРИ СВОИ 8 ПОДАРКОВ 🎁 ПРИ СОЗДАНИИ СВОЕГО МАЙНКРАФТ СЕРВЕРА
Плагины/SafeChest
SafeChest

SafeChest

Never lose your items again! SafeChest automatically saves your inventory in a protected chest when you die. Teleport or fetch it back with simple commands.

170
0
Все версииSafeChest 0.0.5

SafeChest 0.0.5

Release6 мес. назад

Список изменений


📜 CHANGELOG - SafeChest v0.0.5

Welcome to the biggest and most ambitious version of SafeChest to date! Version 0.0.5 is not just a simple update; it’s a total revolution of the plugin. We’ve renamed it, refactored the codebase, added professional-grade admin tools, integrated sound and animation systems, and fixed critical performance bugs that affected server stability. This version is designed for high-traffic servers and demanding administrators.


New Features

  • Added: Full PlaceholderAPI Integration
    The new placeholder package and SafeChestExpansion class allow you to use placeholders like %safechest_time_left%, %safechest_item_count%, and %safechest_location% in any plugin that supports PlaceholderAPI (scoreboards, chat messages, menus, etc.). Customize your server like never before!

  • Added: /safechestadmin Administration Command
    A powerful new system with subcommands:

    • /safechestadmin inspect <player>: Lists all active chests for a player. Entries are clickable for admins to teleport.
    • /safechestadmin delete <uuid>: Deletes a specific chest by its UUID, cleaning both the block and the database.
    • /safechestadmin purge: Manually deletes all expired chests from the database.
    • /safechestadmin stats: Shows global server statistics: total active chests, expired chests, players with active chests, and total players who have used the system.
  • Added: Configurable Sound System
    A new sounds section in config.yml. Sounds play when a chest is created (ENTITY_PLAYER_LEVELUP), inventory is restored (ENTITY_ENDERMAN_TELEPORT), a player teleports, and when a chest expires (ENTITY_ITEM_BREAK). Can be disabled globally.

  • Added: Hologram Blinking Animation
    A new hologram-animation section in config.yml. Holograms blink in configurable colors (red/yellow by default) when the remaining time is below a threshold (10 seconds by default). Option blink-only-time-placeholder: true makes only the {time} placeholder blink.

  • Added: Chest Material Per Group
    In groups.yml, each group can define its own material (e.g., material: "BARREL" for VIPs). This overrides the global material defined in config.yml, allowing visual customization by rank.

  • Added: Pagination System for /sclist
    The /sclist command now displays chests in pages (5 per page by default). If there are many entries, the player sees only one page at a time. Clickable "Previous Page" and "Next Page" buttons are added to the footer. Usage: /sclist 2.

  • Added: Close Button in Preview GUI (/scpreview)
    A BARRIER item has been added to slot 44 of the preview GUI with the name "§c§lClose Preview". Allows the player to explicitly close the GUI, regardless of the force-close-only-with-esc setting.

  • Added: Live Update for Preview GUI
    The /scpreview GUI now automatically refreshes every 5 seconds, reloading the chest's state from the database. If the chest expires while the player is viewing it, the GUI closes automatically and notifies the player.

  • Added: Expiration Warning Notification
    If a chest has a duration greater than 60 seconds, the player receives a warning message 1 minute before it expires, reminding them of its location. The message is customizable in lang.yml (warning.chest_expiring_soon).

  • Added: Enhanced Logging System
    The plugin now logs important events to the server log:

    • log.chest_created: When a chest is created.
    • log.chest_fetched: When a player uses /scfetch.
    • log.chest_teleported: When a player uses /sctp.
    • log.inventory_restored: When an inventory is restored.
    • log.payment_made: When a player pays for a service (teleport/fetch).
  • Added: New Dynamic Placeholders in Death Buttons
    The hover messages for the /sctp and /scfetch buttons that appear upon death can now include {cost} and {time}. Example in lang.yml: hover: "Cost: {cost}. Expires in: {time}."

  • Added: Renaming of Commands and Permissions
    To avoid conflicts and modernize the plugin, all commands and permissions have been renamed from angelchest to safechest.

    • Old Commands: /actp, /acfetch, /acpreview, /aclistNew Commands: /sctp, /scfetch, /scpreview, /sclist.
    • Old Permissions: angelchest.*New Permissions: safechest.*.
    • Old Groups: angelchest.group.*New Groups: safechest.group.*.
  • Added: Database Table Name Change
    To reflect the plugin's new name, the database table has been renamed from angelchests to safechests. This requires manual data migration if updating from a previous version!


🐛 Bug Fixes

  • Fixed: 🐞 Critical Deadlock Bug in Chest Interaction and Breaking
    Description: In v0.0.4, the PlayerInteractEvent (right-click) and BlockBreakEvent loaded the chest from the database synchronously and blocking on the main server thread. This could cause severe lag or even complete server freezes if the database was slow or overloaded. Solution: Both events now load the chest asynchronously. The event is canceled immediately, and the restore or protection logic is executed on the main thread only after the database load has finished. This keeps the server responsive.

  • Fixed: 🐞 Startup Bug: Valid Holograms Not Updating
    Description: Upon server restart, if a chest's holograms already existed physically, the plugin detected them as valid but did not start the timer that updates the countdown. The hologram remained frozen at the time the server restarted. Solution: In PluginContainer.java, in the restoreActiveChests() method, the line hologramManager.startHologramTimer(existingHolograms, (int) secondsLeft, chest); is now added even for existing holograms. This ensures the timer is always active.

  • Fixed: 🐞 Economy Bug: Lack of Error Logging
    Description: If an economic transaction (withdrawing money) failed for any reason (Vault error, negative balance, etc.), the plugin only showed a generic message to the player but did not log the error in the server log, making debugging difficult. Solution: In EconomyManager.java, the withdraw method now logs the specific Vault error message to the server log (mainPlugin.getLogger().severe(...)).

  • Fixed: 🐞 Minor Configuration Bug: Enabled vs. Disabled Worlds
    Description: In v0.0.4, the setting was called behavior.enabled-worlds, implying a whitelist. The logic was confusing. Solution: In v0.0.5, the setting has been renamed to behavior.disabled-worlds, turning it into a blacklist. The logic is clearer: if the list is not empty and the player's world is in it, the plugin is disabled for that player in that world.

  • Fixed: 🐞 Consistency Bug: Chest Material in Fetch
    Description: When using /scfetch, the chest was moved to the player, but it used the global material from config.yml (getAngelChestMaterial()), ignoring the specific material for the player's group. Solution: Although not explicitly shown in the AngelChestService.java snippet for the moveChestToPlayer method, the general logic of the plugin now relies on GroupConfig. It is assumed this bug was fixed during the refactoring process, as the material is obtained from the group in createAngelChest.


🛠️ Improvements and Internal Changes

  • Improvements in Safe Spot Search (/sctp):

    • The algorithm in TeleportCommand.java has been slightly improved to first search adjacent X/Z coordinates and then upwards, which may result in more intuitive teleports.
  • Improvements in Serialization:

    • Although the core logic of InventorySerializer did not change, it was moved to the new package and its compatibility with the new structure was ensured.
  • Improvements in Configuration:

    • Dozens of new options have been added to config.yml for the new features (sounds, hologram animation, logging, etc.).
    • The groups.yml file now includes the material field.
  • Improvements in Messages (lang.yml):

    • Dozens of new messages have been added for the new features (admin command, pagination, logging, close buttons, etc.).
    • A specific error message for /scpreview when no chest exists was added: error.no_chest_preview.

⚠️ Important Notes for Updating

  • Name Change: This is a rename from AngelChest to SafeChest. All commands, permissions, and the database table have changed.
  • Data Migration: To update from v0.0.4, you will need to:
    1. Back up your database (angelchests.db or the angelchests table in MySQL).
    2. Rename the table from angelchests to safechests in your database.
    3. Update all permissions and command aliases on your server and in permission plugins (like LuckPerms).

Version 0.0.5 transforms SafeChest from a functional plugin into a robust, professional, and feature-rich premium tool! The fix for the deadlock bug is crucial for server stability, and the new features like pagination, the dynamic GUI, and the admin command make it an indispensable tool for any serious server. Update today!

Файлы

safechest-0.0.5.jar(113.11 KiB)
Основной
Скачать

Метаданные

Канал релиза

Release

Номер версии

0.0.5

Загрузчики

Bukkit
Paper
Purpur
Spigot

Версии игры

1.14–1.21.11

Загрузок

106

Дата публикации

6 мес. назад

Загрузил

ID версии

Главная