[1.20-1.21.5]SagaDungeons | Provides the framework for epic adventures! icon

[1.20-1.21.5]SagaDungeons | Provides the framework for epic adventures! -----

SagaDungeons is a feature-rich Minecraft dungeon plugin



SagaDungeons
中文,English

Code (YAML):
# SagaDungeons Changelog

## Version 1.2.0.71 (2025-06-05)

### New Features

- Implemented GUI multi-language system
  - 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 configuration in config.yml
  - Includes 200+ GUI text configurations, covering all interface elements

### Feature Improvements

- Optimized GUI text management system
  - All hardcoded Chinese messages in GUI now read from configuration files
  - Supports dynamic placeholder replacement, e.g., template name, player name, etc.
  - Implemented 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 issue where GUI editing function was not synchronized with template configuration files
  - Resolved issue where configuration file was not updated after modifying creation condition toggles in GUI
  - Added template reload mechanism after all GUI save operations to ensure memory and configuration file synchronization
  - Fixed issue where old configurations were still used when creating dungeons; now uses the latest configuration file content
  - Involved modifications to 13 files
: 9 GUI classes and 4 command classes

### Technical Improvements

- Added `reloadTemplate ( )` after all `saveTemplate ( )` calls to ensure data consistency
- Optimized real-time synchronization mechanism for template configurations, improving reliability of configuration changes
- Followed the principle of unified methods, applying the same reload logic in all relevant locations

## Version 1.2.0.30 (2025-06-05)

### New Features

- Implemented player offline reconnection dungeon state recovery system
  - Resolved state inconsistency issues when players reconnected after being offline inside a dungeon
  - Added `handlePlayerReconnection ( )` method to handle dungeon state checks upon player reconnection
  - Implemented intelligent state recovery mechanism
: automatically detects if a player is in a dungeon world and restores the corresponding state
  - Added orphaned player handling
: automatically teleports players to a safe location if they are in an invalidated dungeon world

### Feature Improvements

- Enhanced `PlayerListener.onPlayerJoin ( )` event handling
  - Delayed player state check by 1 tick to ensure player is fully loaded before state check
  - Added handling logic for various reconnection scenarios
: state recovery, permission verification, orphan cleanup
- Expanded `DungeonManager` class functionality
  - Added `findDungeonByWorldName ( )` method to find corresponding dungeon instance by world name
  - Changed `setPlayerGameMode ( )` method to public, supporting game mode setting during state recovery
- Improved dungeon security system
  - Automatically verifies player permissions on reconnection; players without permission will be safely removed
  - Supports various permission verifications
: public dungeons, private dungeons, creators, etc.

### Message System Updates

- Added reconnection-related message configurations in `messages.yml`
  - `dungeon.reconnect.restored`
: Player state successfully restored message
  - `dungeon.reconnect.rejoined`
: Player rejoined dungeon message
  - `dungeon.reconnect.orphaned`
: Player removed from invalidated dungeon message

### Bug Fixes

- Fixed state inconsistency issue when players reconnected after being offline inside a dungeon
- Fixed incorrect player game mode after reconnection
- Fixed issue where players lacked valid dungeon entry permissions after reconnection
- Fixed issue where orphaned players could remain in deleted dungeon worlds

## Version 1.2.0.13 (2025-06-04)

### New Features

- Implemented custom kickback location feature
  - Added `/sd admin setback` command for administrators to set illegal player kickback locations
  - Created SetBackCommand class to handle kickback location settings
  - Enhanced DungeonSecurityManager to prioritize custom kickback locations, including safe location checks
  - Added `security.custom-kickback-location` configuration item in config.yml

## Version 1.1.0.99 (2025-06-04)

### New Features

- Implemented dungeon safe entry control system
  - Added command blacklist feature to prevent players from using illegal teleport commands in dungeons
  - Implemented legitimate identity detection mechanism, only allowing entry into dungeons through project-legitimate methods
  - Created DungeonSecurityManager class to uniformly manage dungeon security functions

## Version 1.1.0.98 (2025-06-04)

### New Features

- Completed GUI management system development
  - Implemented EditCommand and TemplateEditMainGUI main interface
  - Completed basic information editing GUI (TemplateBasicEditGUI )
  - Completed creation conditions editing GUI (TemplateConditionsEditGUI )
  - Completed reward system editing GUI (TemplateRewardsEditGUI )
  - Completed completion conditions and spawner editing GUI (TemplateCompletionEditGUI/TemplateSpawnersEditGUI )

### Feature Improvements

- Implemented a complete chat input listener system
  - Supports numeric, text, and decimal input validation
  - Integrated AsyncPlayerChatEvent for Bukkit compatibility
  - Used BukkitScheduler to ensure thread safety
- Completed configuration data reading system
  - All GUI interfaces now display actual data from configuration files
  - Supports real-time configuration reading and interface updates
- Implemented advanced management interface system
  - Item Reward Management GUI (ItemRewardManageGUI )
  - Command Reward Management GUI (CommandRewardManageGUI )
  - Time Reward Management GUI (TimeRewardManageGUI )
  - Item Condition Management GUI (ItemConditionManageGUI )
  - Composite Condition Management GUI (CompositeConditionManageGUI )
- Completed spawner management system
  - Spawner editing function (SpawnerEditGUI )
  - Spawner teleport function
  - Spawner add function (SpawnerAddGUI )
- Implemented location setting system
  - Reach area location setting function

## Version 1.0.9.7 (2025-06-03)

### New Features

- Integrated bStats statistics system
  - Added plugin usage data collection feature to help developers understand plugin usage
  - Implemented custom statistical charts
: active dungeon count, available template count, integrated external plugins, used language
  - Used official bStats-bukkit 3.0.2 version to ensure data security and privacy protection
  - Plugin ID
: 26069, statistics can be viewed at https://bstats.org/plugin/bukkit/SagaDungeons

### Technical Improvements

- Added bStats dependency and shadow plugin relocation configuration in build.gradle
  - Used `implementation 'org.bstats:bstats-bukkit:3.0.2'` to add dependency
  - Configured shadow plugin to relocate bStats to `cn.i7mc.sagadungeons.libs.bstats` package to avoid conflicts with other plugins
- Added bStats initialization method in SagaDungeons main class
  - Called `initializeMetrics ( )` method in onEnable method
  - Added four custom statistical charts to collect plugin usage data
- Added statistical methods to DungeonManager and TemplateManager classes
  - Added `getActiveDungeonCount ( )` method to count active dungeons
  - Added `getTemplateCount ( )` method to count available templates

### Data Collection Notes

- **Active Dungeon Count**
: Real-time statistics of the number of dungeon instances running on the server
- **Available Template Count**
: Statistics of the total number of dungeon templates configured on the server
- **Integrated External Plugins**
: Shows successfully integrated external plugins (Vault, PlayerPoints, MythicMobs, PlaceholderAPI )
- **Used Language**
: Statistics of the language setting configured for the plugin (Chinese/English, etc. )

### Privacy Protection

- Data collected by bStats is completely anonymous and does not include any personal information about servers or players
- All data is used only for statistical analysis to help improve plugin features and performance
- Server administrators can disable data collection through the bStats configuration file

## Version 1.0.9.6 (2025-06-03)

### New Features

- Implemented visual effects system after dungeon completion
  - Added firework effect after completion
: player launches 3 random style fireworks every 3 seconds until teleported out of the dungeon
  - Implemented Title display
: shows "Congratulations on completing the dungeon" and a countdown subtitle
  - Added countdown reminder system
: reminds every 5 seconds before the last 3 seconds, then every 1 second for the last 3 seconds
  - Used Bukkit native API for Title display to ensure Bukkit server compatibility

### Feature Improvements

- Optimized user experience after dungeon completion
  - Moved hardcoded time values to config.yml, supporting custom configuration
  - Implemented configurable countdown system, administrators can customize reminder intervals and teleport delays
  - All reminder messages are customizable in the message configuration file, avoiding hardcoding

### Bug Fixes

- Fixed completion message configuration structure issue
  - Resolved inconsistent message key path issue
: unified to use 'dungeon.completion.success' path
  - Corrected incorrect position of 'completion' node in English message file messages_en.yml
  - Ensured consistent structure between Chinese and English message files to avoid "message not found" errors

### Configuration Updates

- Added completion-related time configurations in config.yml
  ```yaml
  completion
:
    teleport-delay
: 10   # Teleport delay after completion (seconds)
    countdown-interval
: 5   # Countdown reminder interval (seconds)
    final-countdown
: 3   # Final countdown start time (seconds)
    firework-interval
: 3   # Firework launch interval (seconds)
  ```

- Added completion-related messages in message configuration files
  - Countdown reminder message
: `dungeon.completion.countdown`
  - Final countdown message
: `dungeon.completion.final-countdown`
  - Title display messages
: `dungeon.completion.title` and `dungeon.completion.subtitle`

## Version 1.0.9.4 (2025-05-24)

### New Features

- Implemented time-based early completion reward system
  - Added `TimeReward` reward class, supporting different rewards based on completion time
  - Added `timeRewards` configuration support in `DungeonTemplate`, using `TreeMap` to intelligently match the best time reward
  - Extended `TemplateManager`'s `parseTimeString()` method to support multiple time formats
: `3600` (seconds ), ` "1h"` (hours ), ` "90m"` (minutes ), ` "30s"` (seconds ), ` "1d"` (days )
  - Added `giveTimeRewards ( )` method in `RewardManager` to handle time reward distribution and message display
  - Modified `DungeonInstance.handleCompletion ( )` method to automatically calculate completion time and grant corresponding time rewards

### Features

- **Intelligent Time Matching**
: Uses `TreeMap.floorEntry ( )` method to automatically select the best qualifying time reward
- **Flexible Time Formats**
: Supports pure numeric seconds and time formats with units, with automatic parsing and conversion
- **Complete Message System**
: Displays time taken in completion messages, dedicated time reward message prompts
- **Backward Compatible**
: Does not affect existing basic reward system, optional feature, fully adheres to the project's modular architecture

### Configuration Example

```yaml
# Time Rewards Configuration - Give different rewards based on completion time
timeRewards
:
  # Complete within 1 hour - Highest reward
  "1h"
:
    commands
:
     - "give %player% diamond 5"
      - "eco give %player% 1000"
      - "say %player% completed the dungeon within 1 hour and received diamond rewards!"

  # Complete within 1.5 hours - Medium reward
  "90m"
:
    commands
:
     - "give %player% gold_ingot 10"
      - "eco give %player% 500"
      - "say %player% completed the dungeon within 1.5 hours and received gold ingot rewards!"

  # Complete within 2 hours - Basic reward
  "2h"
:
    commands
:
     - "give %player% iron_ingot 20"
      - "eco give %player% 200"
      - "say %player% completed the dungeon within 2 hours and received iron ingot rewards!"
```

### Message Configuration Updates

- Updated completion messages in `messages.yml` to include time taken display
- Added time reward related message configurations
: `dungeon.reward.time.header`, `dungeon.reward.time.description`, `dungeon.reward.time.footer`
- Updated dungeon template example `templates/example/config.yml` with time reward configuration examples

## Version 1.0.9.3 (2025-05-18)

### Bug Fixes

- Fixed world unload failure when deleting a dungeon using `/sd admin delete` command
  - Implemented a complete world unload and deletion process
: 1. Teleport players out of the world 2. Save the world 3. Delay 20 ticks 4. Unload the world 5. Delay another 20 ticks 6. Delete world files
  - Added appropriate delay mechanisms to ensure each operation has enough time to complete, avoiding NoSuchFileException errors
  - Retained player teleportation and entity cleanup steps to ensure safe deletion
- Fixed issues caused by `session.lock` and `uid.dat` files during world file copying
  - Added filtering for `session.lock` file during file copying process to avoid copying locked files
  - Added filtering for `uid.dat` file during file copying process to prevent created dungeon worlds from being identified as duplicate worlds
  - Also ignored these special files during file count and size statistics to ensure accurate progress calculation

### Performance Optimizations

- Optimized dungeon world generation process, significantly reducing main thread lag
  - Added creation lock mechanism to prevent server overload from multiple simultaneous dungeon creations
  - Used Java 17 new features to optimize file operations, improving file copy and delete efficiency
  - Improved asynchronous file copying mechanism, using Files.walk and Stream API instead of traditional recursive methods
  - Optimized world loading parameters to reduce resource consumption
  - Added detailed performance logs to record file operation and world loading times
  - Used latest Paper 1.20.1 API, such as WorldCreator's keepSpawnLoaded method and GameRule enum

### Code Optimizations

- Refactored world unload and delete related methods in WorldManager class
  - Improved `deleteDungeonWorld` method to implement a step-by-step world unload and deletion process
  - Optimized `deleteWorldFolder` method, adding world saving, delayed unload, and delayed deletion mechanisms
  - Unified world deletion logic to ensure code is concise, efficient, and operations are safe and reliable
  - Added more detailed debug logs, recording each step of world unloading and deletion
- Optimized file operation methods in BukkitFileUtil class
  - Improved file deletion logic, using reverse sorting to ensure files and subdirectories are deleted before parent directories
  - Optimized file copying process into two steps
: first create all directory structures, then copy all files
  - Added filtering mechanism for special files to avoid copying locked files
  - Moved all hardcoded log messages to debugmessage.yml file, making them customizable

### Feature Improvements

- Improved dungeon world cleanup mechanism on server shutdown, ensuring no remnant worlds are left
- Optimized world creation process, adding more game rule settings like disabling fire spread, random tick, etc.
- Improved world loading parameter configuration, reducing resource consumption and server load
- Added creation lock status check and提示 messages; when a dungeon is being created, other players will receive friendly prompts
- Enhanced world unload and delete mechanism, adding delayed processing and status checks to ensure safe and reliable operations
- Added support for English message file, fixed missing "admin-close" message key issue

## Version 1.0.9 (2025-05-17)

### Code Optimizations

- Optimized command structure, moving spawner management commands from player commands to admin commands
  - Created new `SpawnerAdminCommand` class for managing dungeon spawners
  - Modified `AdminCommand` class to add calls to `SpawnerAdminCommand`
  - Updated command help information to reflect the new command structure
  - Added `getCurrentDungeonId` method to `DungeonManager` class to get the player's current dungeon ID

### Feature Improvements

- Improved command permission management, ensuring only administrators can manage spawners
- Maintained compatibility with existing features; spawner management functionality remains the same, only the command location has moved

## Version 1.0.8 (2025-05-17)

### Feature Improvements

- Optimized MythicMobs monster spawning mechanism
  - Added `MobSpawnerManager` class, responsible for managing monster spawning in dungeons
  - Added `spawnMob` method in `MythicMobsHook` class for direct monster spawning
  - Modified `SpawnerCommand` class to use the new method for spawning monsters
  - Added code in `DungeonManager` class to initialize spawners after successful dungeon world creation and clean up spawners when deleting dungeons

### Bug Fixes

- Fixed issue where MythicMobs monster spawn points set by command would generate persistent spawner configuration files in the MythicMobs plugin directory
- Fixed issue where monsters did not spawn after players entered the dungeon, resolved by improving location parsing and delaying spawner initialization
- Fixed issue where spawner locations incorrectly saved temporary dungeon world names (e.g., "sd_001-fba" ); now only saves coordinate information
- Fixed issue where location strings containing template names (e.g., "fba,x,y,z,yaw,pitch" ) caused parsing errors
- Improved monster spawning logic, no longer relying on persistent spawner configuration files
- Optimized monster cleanup mechanism on dungeon closure, ensuring no remnant entities are left

### Code Optimizations

- Implemented a more efficient monster spawning method, improving performance
- Simplified location parsing logic, removed redundant code, maintaining high readability
- Completely removed debug log outputs, making the code cleaner
- Modified `SpawnerCommand` class to use `LocationUtil.locationToStringWithoutWorld` method for saving locations, avoiding saving temporary dungeon world names
- Enhanced location parsing logic in `MobSpawnerManager` class to handle various location string formats
- Supports one-time spawners and periodic spawners to meet different needs
- Followed modular, visual, unified, and minimalist principles, simplifying the monster spawning process

## Version 1.0.7 (2025-05-17)

### New Features

- Implemented dungeon trigger system
  - Added `DungeonTrigger` interface, supporting custom trigger implementations
  - Implemented `LevelJumpTrigger` class for handling dungeon level jumps
  - Added `TriggerManager` class for managing and executing triggers
  - Supports trigger priority and condition combinations
  - Optimized trigger execution logic to ensure thread safety

### Feature Improvements

- Optimized dungeon level switching mechanism, using trigger system instead of direct jumps
- Improved trigger condition checking logic, supporting more complex condition combinations
- Enhanced trigger execution configurability, supporting custom execution order and priority

### Configuration Example

```yaml
triggers
:
  level_jump
:
    type
: LEVEL_JUMP
    priority
: 1
    conditions
:
      - type
: MOB_KILL
        count
: 10
      - type
: REACH_AREA
        location
: "world,100,64,100"
        radius
: 3.0
    actions
:
      - type
: JUMP_TO_LEVEL
        target_level
: 2
```

## Version 1.0.6 (2025-05-17)

### New Features

- Enhanced dungeon completion condition system
  - Added support for condition combination modes (AND/OR )
  - Implemented condition priority system
  - Supports multi-level condition combinations
  - Optimized condition progress display

### Feature Improvements

- Optimized completion condition configuration structure, supporting more flexible condition combinations
- Improved condition progress calculation logic, providing different progress calculation methods for AND/OR modes
- Enhanced condition description system, providing more detailed progress information

### Configuration Example

```yaml
completion
:
  # Composite condition example
  composite
:
    type
: AND   # or OR
    priority
: 1
    conditions
:
      condition1
:
        killCount
:
          count
: 10
      condition2
:
        reachArea
:
          location
: "world,100,64,100"
          radius
: 3.0
```

## Version 1.0.5 (2025-05-17)

### Fixed Issues

- Fixed issue where GUI dungeon creation failed; now GUI dungeon creation and command dungeon creation use the same message path and parameters
- Fixed "Message not found
: admin-close " error by correctly identifying message hierarchy in YAML file and updating code path reference to "command.death.admin-close "

## Version 1.0.4 (2025-05-17)

### New Features

- Added `/sd admin gui` command to open the GUI management interface
- Added related command help and prompt messages in `messages.yml`

### Fixed Issues

- Fixed issue where deleting remnant dungeon worlds failed on server startup
- Fixed issue where administrators using `/sd admin delete <dungeonID>` command could not successfully delete dungeon world folders
- Fixed "
dungeon.admin-close " message not found issue, ensuring players receive correct prompts when their dungeon is closed by an admin

### Code Optimizations

- Optimized world deletion logic in `WorldManager` class, adding folder existence checks and delayed deletion mechanisms
- Improved `deleteDungeonWorld` and `deleteWorldFolder` methods to ensure delete operations are executed on the main thread
- Enhanced logging, adding more detailed operation information and error prompts
- Followed modular, visual, unified, and minimalist principles, simplifying the world deletion process

## Version 1.0.3 (2025-05-17)

### Fixed Issues

- Fixed issue where after deleting a dungeon with `/sd admin delete <dungeonID>`, it was still possible to join it via `/sd join <dungeonID>`
- Optimized code in `WorldManager` class regarding world unloading and deletion, simplified into three clear steps: 1. Teleport players out of the world 2. Unload the world 3. Delete world files
- Improved `DungeonManager.deleteDungeon()` method to immediately remove dungeon instance from active dungeon list and set dungeon state to `DELETING`
- Enhanced `JoinCommand` and `DungeonManager.joinDungeon()` methods, adding checks for dungeon state to prevent players from joining dungeons that are being deleted or are completed
- Added new message key `command.join.dungeon-not-available` in `messages.yml` to inform players that a dungeon is unavailable

### Code Optimizations

- Refactored `WorldManager` class, splitting the complex `cleanupRemnantWorlds` method into multiple single-responsibility methods
- Created `teleportPlayersOutOfWorld` method specifically for player teleportation
- Created `cleanupLoadedDungeonWorlds` and `cleanupUnloadedDungeonFolders` methods to handle loaded and unloaded dungeon worlds respectively
- Created `tryLoadAndDeleteWorld` and `deleteWorldFolder` methods to handle world loading and deletion
- Reduced code nesting levels, improving readability and maintainability

## Version 1.0.2 (2025-05-17)

### Fixed Issues

- Fixed issue where respawn point coordinates in dungeon templates included temporary dungeon world names; now only saves coordinate information (X, Y, Z, Yaw, Pitch) without world name
- Fixed incomplete command help information, adding missing command descriptions, including `/sd leave`, `/sd help`, and `/sd admin help` etc.
- Fixed respawn point saving logic in `SetSpawnCommand` class, ensuring correct use of template respawn points in different dungeon instances
- Fixed respawn logic in `DeathManager` class; now players are correctly teleported to the respawn point set in the template after death

### Feature Improvements

- Optimized `LocationUtil` class, adding `locationToStringWithoutWorld` and `stringToLocationWithoutWorld` methods for handling coordinates without world names
- Improved player teleportation logic in `DungeonManager` class, using new coordinate handling methods to ensure players are correctly teleported to dungeon respawn points
- Added spawner ID prompt messages in `messages.yml` to improve user experience
- Perfected command help system, ensuring all commands have corresponding help information

## Version 1.0.1 (2025-05-16)

### Fixed Issues

- Fixed issue where player_cooldowns.yml file would not reset after server restart; now automatically clears all player dungeon creation cooldowns on plugin startup
- Fixed auto-completion for "
/sd spawner set " command; now only shows concise spawner ID suggestions (e.g., mob1, boss, spawn1) and added prompt messages
- Fixed API compatibility issue in MythicMobsHook class, resolving "
setRemainingCooldownSeconds " method not found error
- Improved implementation of one-time spawners; now tries multiple methods to set spawners to refresh only once
- Added more detailed log output for easier troubleshooting of spawner-related issues

### Feature Improvements

- Optimized spawner system: when cooldown parameter is not specified (e.g., "
/sd spawner set fb1 WolfKing 1 "), spawner will be set as a one-time spawner with a default cooldown of 99999999 seconds
- When cooldown parameter is specified (e.g., "
/sd spawner set fb1 WolfKing 1 30 "), spawner will respawn at the specified time after the monster is killed
- Added spawner command related prompt messages in messages.yml, supporting custom configuration

## Version 1.0.0 (2025-05-16)

### New Features

- Dungeon System Core Features
  - Dungeon creation and management
  - Dungeon world copying and loading
  - Dungeon timeout and automatic cleanup
  - Player teleportation and location recording
  - Dungeon public/private settings
  - Player permission management

- Dungeon Creation Condition System
  - Gold condition (Vault)
  - Points condition (PlayerPoints)
  - Item condition
  - Level condition
  - Custom condition interface

- Dungeon Completion System
  - Kill all condition
  - Reach area condition
  - Kill specific monster condition
  - Kill count condition
  - Custom condition interface

- Dungeon Reward System
  - Gold reward
  - Points reward
  - Item reward
  - Experience reward
  - Command reward
  - Custom reward interface

- Dungeon Death Management System
  - Death limit
  - Kick-out handling after reaching limit
  - Custom revive item system
  - Respawn point setting and teleportation

- Player Data Persistence
  - Player data model design
  - Data saving and loading
  - Statistical data collection

- Command System
  - `/sd create <template>` - Create a dungeon
  - `/sd list` - List all dungeons
  - `/sd stats [player]` - View dungeon statistics
  - `/sd invite <player>` - Invite a player to a dungeon
  - `/sd join <ID/playername>` - Join a dungeon
  - `/sd leave` - Leave current dungeon
  - `/sd kick <player>` - Kick a player from a dungeon
  - `/sd public` - Toggle dungeon public/private status
  - `/sd spawner <set/remove/list>` - Manage spawners
  - `/sd help` - Display help information
  - `/sd reload` - Reload configuration
  - `/sd admin reload` - Reload configuration
  - `/sd admin delete <dungeonID>` - Delete specified dungeon
  - `/sd admin tp <dungeonID>` - Teleport to specified dungeon
  - `/sd admin list` - List all dungeons
  - `/sd admin createtemplate <templateName> [worldPath]` - Create a new dungeon template
  - `/sd admin setworld <templateName>` - Set current world as dungeon template's world
  - `/sd admin copyworld <templateName> <worldName>` - Copy specified world to dungeon template's world directory
  - `/sd admin setitem <templateName> <type> [amount]` - Set held item as dungeon condition or reward
  - `/sd admin forceclose <dungeonID/all>` - Force close specified dungeon or all dungeons
  - `/sd admin setspawn <templateName>` - Set current location as dungeon template's respawn point
  - `/sd admin help` - Display admin help information

- Plugin Integrations
  - Vault Integration (Economy system)
  - PlayerPoints Integration (Points system)
  - MythicMobs Integration (Monster system)
  - PlaceholderAPI Integration (Variable system)

### Optimizations

- Asynchronous world copying to avoid server lag
- Use of ReadWriteLock mechanism to protect dungeon instance data
- Implementation of player location recording and recovery mechanism
- All time-consuming operations executed in asynchronous threads
- Use of thread-safe collection classes
- Use of reflection mechanism to ensure compatibility with different versions of MythicMobs API

### Documentation

- User Guide
  - Player Command Guide
  - Admin Command Guide
  - Configuration File Explanation
  - Dungeon Completion Conditions and Rewards Configuration Explanation
  - Death Limits and Revive Item Configuration Explanation

- Developer Guide
  - API Usage Instructions
  - Extension Development Guide
  - Code Structure Explanation
  - Custom Completion Conditions and Rewards Development Guide
  - Custom Death Handling and Revive Mechanism Development Guide

## Version Plan

### Version 1.1.0

- Dungeon Leaderboard System
- Multi-stage Dungeon Support
- Dungeon Difficulty Adjustment
- Custom Dungeon Event Triggers

### Version 1.2.0

- Enhanced Dungeon Statistics System
- Dungeon Achievement System
- Dungeon Time-limited Challenge Mode
- GUI Interface Feature Expansion


Overview

SagaDungeons is a feature-rich Minecraft dungeon plugin for Paper 1.20.1 (Java 17), designed to allow server administrators and players to create, manage, and run instanced dungeon worlds. Create temporary, template-based副本 (dungeons) with integrated economy (Vault & PlayerPoints), custom mobs (MythicMobs), and dynamic placeholders (PlaceholderAPI).

Whether you want players to create their own private lairs or offer pre-defined server challenges, SagaDungeons provides the framework for epic adventures!

  • Fully Instanced: Each dungeon run is a separate world, ensuring no interference.
  • Highly Customizable: Define templates with unique mobs, timeouts, creation costs, and rewards.
  • Asynchronous Operations: Smooth world copying and management without lagging your server.
  • Dependency Integration: Works seamlessly with popular economy and mob plugins.
  • Player-Driven or Admin-Controlled: Allow players to create dungeons or reserve them for server events.
  • Comprehensive Configuration: Fine-tune every aspect of your dungeons.
  • Automatic Cleanup: Dungeons are temporary instances; server restarts automatically clean up all dungeon worlds and files, while player statistics are retained.


✨ Core Features

  • ️ Dynamic World Management
    • Template System: Import and manage world templates from `plugins/SagaDungeons/templates/`.
    • Asynchronous World Copying: Uses Paper API for efficient, non-blocking world duplication.
    • Unique Naming Convention: Dungeons are named e.g., `sd_001-EvilLair` for easy identification.
    • Lifecycle Management: Create → Run → Timeout/Complete → Unload → Delete.
    • Startup Cleanup: Automatically cleans any orphaned dungeon worlds on server start.

  • ️ Dungeon Instance Control
    • Instance Management: Track active dungeons, owners, allowed players, and state.
    • Configurable Timeouts: Set time limits for dungeons with warnings.
    • Safe Player Teleportation: Securely teleport players in and out of dungeons.
    • Public/Private Dungeons: Owners can control who can join their instance.
    • Invite System: Players can invite others to their private dungeons.

  • ⚖️ Permissions & Conditions
    • Creation Requirements: Define costs for creating dungeons (Vault currency, PlayerPoints, Items, Player Level).
    • Cooldown System: Per-player and global cooldowns for dungeon creation. Cooldowns are reset on server restart.
    • Flexible Conditions: Enable/disable specific requirement types per template.

  • MythicMobs Integration
    • Dynamic Spawner Management: Create, edit, and remove MythicMobs spawners within dungeons.
    • In-Game Editor Commands: `/sd setspawn <mobType> [groupName]` & `/sd removespawn <radius>`.
    • Spawner Persistence: Spawners can be pre-configured in templates or managed dynamically.
    • One-Time Spawners: Set spawners to activate only once by omitting cooldown time (defaults to a very long cooldown).

  • PlaceholderAPI Support
    • Custom Placeholders: `%sd_world_name%`, `%sd_owner%`, `%sd_time_left%`, `%sd_player_count%`, and more.
    • Register your expansion with `/papi ecloud download SagaDungeons` and `/papi reload`.

  • Commands & GUI
    • Intuitive Commands: Easy-to-use player and admin commands (see below).
    • Interactive GUIs:
      • Template Selection
      • Dungeon Management
      • Player Invitation
      • (Planned: Mob Editing GUI)

  • Rewards & Completion
    • Customizable Completion Conditions: (e.g., kill all mobs, kill specific mob, reach area).
    • Versatile Reward System: (e.g., Vault currency, PlayerPoints, items, experience, commands).

  • ☠️ Death Management
    • Death Limits: Configure maximum deaths before a player is ejected.
    • Custom Revival Items: Allow players to use specific items to revive.
    • Configurable Respawn Points.

  • Item Serialization
    • Full ItemStack serialization/deserialization for item conditions, rewards, and revival items.


Dependencies
  • Paper 1.20.1+ (Compiled with Java 17)
  • Vault (Required for economy features)
  • PlayerPoints (Required for PlayerPoints features)
  • MythicMobs (Required for custom mob spawning)
  • PlaceholderAPI (Required for placeholder support)


⌨️ Commands
Main alias: `/sd`

Code (Text):

/sd create <templateName> - Creates a new dungeon instance from a template.
/sd join <instanceID/ownerName> - Joins an existing dungeon.
/sd invite <playerName> - Invites a player to your current dungeon.
/sd kick <playerName> - Kicks a player from your dungeon (owner only).
/sd leave - Leaves your current dungeon.
/sd list - Lists available public dungeons or templates.
/sd public - Toggles your dungeon between public and private (owner only).
/sd setspawn <mobType> [groupName] - (In-dungeon) Sets a MythicMobs spawner at your location.
/sd removespawn <radius> - (In-dungeon) Removes nearby MythicMobs spawners.
 

Code (Text):

/sd admin create <templateName> [ownerName] - Force-creates a dungeon.
/sd admin delete <instanceID> - Deletes an active dungeon instance.
/sd admin tp <instanceID> - Teleports you to a dungeon instance.
/sd admin reload - Reloads the plugin's configuration files.
/sd admin setspawn ... - Admin version for setting spawners.
/sd admin removespawn ... - Admin version for removing spawners.
 


Permissions
  • `sagadungeons.user` - Basic access to player commands.
  • `sagadungeons.create.<templateName>` - Allows creating a dungeon from a specific template.
  • `sagadungeons.create.all` - Allows creating dungeons from any template.
  • `sagadungeons.join` - Allows joining dungeons.
  • `sagadungeons.admin` - Grants access to all admin commands and features.
  • `sagadungeons.command.setspawn` - Permission to use the setspawn command.
  • `sagadungeons.command.removespawn` - Permission to use the removespawn command.
(More specific permissions may be available for granular control)

Placeholders (PlaceholderAPI)
  • `%sd_world_name%` - Display name of the player's current dungeon.
  • `%sd_owner%` - Owner of the player's current dungeon.
  • `%sd_time_left%` - Time remaining in the player's current dungeon.
  • `%sd_player_count%` - Number of players in the player's current dungeon.
  • *... and more! Check `messages.yml` or use PAPI expansion features for a full list.*


⚙️ Configuration
SagaDungeons offers extensive configuration options:
  • `config.yml`: Main plugin settings, debug mode, default behaviors.
  • `messages.yml`: All user-facing messages, fully translatable with color & PAPI support.
  • `debugmessage.yml`: Messages for debug output.
  • `templates.yml`: (Potentially for global template settings, or templates are folder-based)
  • `player_cooldowns.yml`: Stores player cooldowns (cleared on restart).
  • `plugins/SagaDungeons/templates/[templateName]/config.yml`: Specific configuration for each dungeon template.
    • `displayName`: Custom name like "&6Evil Dragon's Lair".
    • `defaultTimeout`: Duration in seconds.
    • `worldPath`: Path to the world files for this template (including region folder).
    • `creationConditions`:
      • `money`: { enabled: true, amount: 1000 }
      • `playerpoints`: { enabled: true, amount: 100 }
      • `items`: { enabled: true, items: [serialized_item_1, ...] }
      • `level`: { enabled: true, level: 10 }
    • `mythicMobsSpawners`: Pre-defined MythicMobs spawners for the template.
    • `completionConditions`: Define how the dungeon is cleared.
    • `rewards`: Define rewards upon completion.
    • `deathSettings`: Death limits, revival items, etc.
Note: All user messages are in `messages.yml` for easy translation. Debug messages are in `debugmessage.yml` and controlled by `debug: true/false` in `config.yml`.


Installation
  1. Ensure you have a Paper 1.20.1+ server running Java 17.
  2. Install all required dependencies: Vault, PlayerPoints, MythicMobs, PlaceholderAPI.
  3. Download the latest `SagaDungeons.jar` file.
  4. Place `SagaDungeons.jar` into your server's `plugins` folder.
  5. Restart your server.
  6. Configure the plugin via files in `plugins/SagaDungeons/`.
  7. Set up your dungeon templates in `plugins/SagaDungeons/templates/`.


Future Plans
  • Dungeon Leaderboard System
  • Multi-Stage Dungeons
  • Adjustable Dungeon Difficulty
  • Custom Dungeon Event Triggers
  • Advanced Dungeon Statistics & Achievements
  • Timed Challenge Modes
  • GUI for Mob Spawner Editing



Thank you for considering SagaDungeons!
We aim to provide a powerful and flexible dungeon system for your server.
Please report any bugs or suggest features on our GitHub Issues Page
(Replace with actual links if available)

Source Code (GitHub)
Resource Information
Author:
----------
Total Downloads: 215
First Release: May 17, 2025
Last Update: Yesterday at 4:55 PM
Category: ---------------
All-Time Rating:
2 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings