Fixed a bug in the ReachArea completion condition related to world name detection: The original ReachArea condition had a hardcoded world name check, which caused it to fail in temporary instance copies.
Reason: Each instance copy has its own unique, temporary world name (e.g., dungeon_example_abc123_1703123456), whereas the world name in the configuration file is static (e.g., world).
Fix: The dependency on the world name has been removed. The condition now only checks the player's relative coordinates within the current instance.
Impact: The ReachArea condition now functions correctly across all temporary instance copies.
Functional Improvements
Optimized ReachArea Detection Mechanism
Configuration Format Update: The format has been changed from a single location string like location: "world,100,64,100" to a more structured coordinate configuration: YAML reachArea: x: 5 # Target X coordinate y: 5 # Target Y coordinate z: 5 # Target Z coordinate range: 10 # Detection range
Detection Method Improvement: The detection method has been changed from a circular radius check to a cubic (box-shaped) area check, which is more intuitive and easier to understand.
Range Setting: A new range parameter has been added to define the cubic detection area centered around the target coordinates.
Code Optimization
Refactored the ReachAreaCondition class constructor to accept coordinate parameters directly, rather than a Location object.
The detection logic is now deltaX <= range && deltaY <= range && deltaZ <= range.
Removed the world name comparison to ensure it works correctly in any instance copy.
Updated the CompletionManager loading logic to read the x, y, z, and range parameters from the configuration file.
Removed the dependency on LocationUtil.stringToLocation().
Optimized the GUI management interface (TemplateCompletionEditGUI) to save coordinates instead of a location string.
Updated the logic for reading and displaying configurations.
Configuration File Updates
The sample template configuration file has been updated to include examples of the new ReachArea configuration format.
Detailed configuration instructions and comments have been provided.
Backward Compatibility: The new format is designed to be backward compatible.
The new configuration format is more concise and intuitive.
Administrators no longer need to manage world names and only need to set the coordinates and range.
Technical Features
World-Agnostic: The ReachArea condition is no longer dependent on specific world names.
Universal Compatibility: It is suitable for all temporary instance copies.
Simplified Configuration: Configuration for administrators is now simpler and more intuitive.
Performance Optimization: The logic now uses simple coordinate comparisons, eliminating the need for complex distance calculations.
Created GUILanguageManager class, dedicated to managing multi-language support for GUI interfaces.
Added lang_gui.yml (Chinese) and lang_gui_en.yml (English) configuration files.
Modified AbstractGUI base class, adding multi-language support methods and helper tools.
Successfully refactored 9 main GUI classes to support automatic loading of corresponding language files based on the lang setting in config.yml.
Includes 200+ GUI text configurations, covering all interface elements.
Improvements
Optimized GUI text management system.
All hardcoded Chinese messages in GUI are now read from configuration files.
Supports dynamic placeholder replacement, such as template names, player names, etc.
Implemented a language file fallback mechanism to ensure system stability.
Added convenient helper methods to simplify multi-language implementation in GUI classes.
Version 1.2.0.66 (2025-06-05)
Bug Fixes
Fixed an issue where GUI editing functionality was not synchronized with template configuration files.
Resolved an issue where the configuration file was not updated after modifying creation condition toggles in the GUI.
Added a template reload mechanism after all GUI save operations to ensure synchronization between memory and configuration files.
Fixed an issue where old configurations were still used when creating dungeon instances; now uses the latest configuration file content.
Involved modifications to 13 files: 9 GUI classes and 4 command classes.
Technical Improvements
Added reloadTemplate() calls after all saveTemplate() calls to ensure data consistency.
Optimized the real-time synchronization mechanism for template configurations, improving the reliability of configuration changes.
Followed a unified method principle, applying the same reload logic in all relevant locations.
Version 1.2.0.30 (2025-06-05)
New Features
Implemented a system for player state restoration upon reconnection to a dungeon after being offline.
Resolved state inconsistency issues when players reconnected after being offline within a dungeon.
Added handlePlayerReconnection() method to handle dungeon state checks when players reconnect.
Implemented an intelligent state restoration mechanism: automatically detects if the player is in a dungeon world and restores their state accordingly.
Added orphaned player handling: players in invalid/expired dungeon worlds are automatically teleported to a safe location.
Improvements
Enhanced PlayerListener.onPlayerJoin() event handling.
Delayed player state check by 1 tick to ensure the player is fully loaded before performing the check.
Added handling logic for various reconnection scenarios: state restoration, permission verification, orphan cleanup.
Extended DungeonManager class functionality.
Added findDungeonByWorldName() method to find corresponding dungeon instances by world name.
Changed setPlayerGameMode() method to public to support game mode setting during state restoration.
Improved dungeon security system.
Automatically verifies player permissions upon reconnection; players without permission will be safely removed.
Supports various permission verifications, including public dungeons, private dungeons, creators, etc.
Message System Updates
Added reconnection-related message configurations in messages.yml:
dungeon.reconnect.restored: Message for successful player state restoration.
dungeon.reconnect.rejoined: Message for player rejoining a dungeon.
dungeon.reconnect.orphaned: Message for player being removed from an invalid/expired dungeon.
Bug Fixes
Fixed state inconsistency issues when players reconnected after being offline within a dungeon.
Fixed incorrect player game mode after reconnection.
Fixed issues where players lacked valid dungeon entry permissions after reconnection.
Fixed an issue where orphaned players could remain stuck in deleted dungeon worlds.