Skip to content

Conversation

@5f32797a
Copy link

Intelligent Addon & State Management

The core addon handling logic has been completely rewritten to be state-aware.

  • State Tracking: A new processed.json file is used to store a "footprint" (a hash or modification date) and a list of installed pack folders for each addon file.
  • Modification Detection: The plugin now automatically detects when a local or remote addon file has been changed. It cleans up the old installed version and extracts the new one.
  • Automatic Cleanup: If an addon file is deleted from the /addons folder, the plugin will automatically remove its corresponding packs from the world folder on the next server start.
  • Self-Healing: The system now checks if an installed pack folder has been manually deleted and will re-install it if the source addon file still exists, ensuring consistency.

Robust Extraction & Processing

The method for extracting addons has been greatly improved.

  • Recursive Extraction: The plugin can now correctly process complex archives like .mcaddon files that contain multiple nested .mcpack or .zip files.
  • Conflict-Free Naming: It generates unique, hashed folder names for each pack (e.g., MyAddon_a1b2c3d4). This prevents name collisions and ensures that cleaning up an addon only removes its specific files.
  • Improved Error Handling: The extraction process is more resilient, with better logging for corrupted archives or invalid manifest files.

Documentation and Usability

  • Updated README: The README.md has been significantly updated with a "Key Features" section and a "How It Works" section to clearly explain the new, powerful capabilities of the plugin.
  • Auto-Configuration: The plugin now attempts to auto-detect the default world folder and sets sensible defaults in config.json if they are missing, improving the initial setup experience.

5f32797a added 3 commits July 8, 2025 23:55
This commit introduces a major enhancement to the addon management system, resolves a critical logging bug, establishes an automated build and release pipeline, and updates the documentation.

**1. Advanced Addon Processing & State Management:**
- Implements recursive processing to fully support nested archives (e.g., .mcaddon files containing multiple .mcpacks).
- Generates unique, hashed folder names for each pack to prevent conflicts and ensure safe installation.
- Automatically detects file modifications to clean up old versions and reinstall updated ones.
- Cleans up installed packs automatically if the source addon file is deleted.
- Reinstalls packs if they are detected as missing from the world folders (e.g., after manual deletion).

**2. Bug Fix:**
- Resolves a TypeError that occurred when logging addon filenames with non-standard characters.
- All filenames are now sanitized before being logged to ensure stability.

**3. CI/CD Automation:**
- Adds a GitHub Actions workflow to automate the build and release process.
- The workflow triggers on new version tags (v*.*.*), builds the package, and creates a GitHub Release with the distributable files attached.

**4. Documentation:**
- Updates the README.md to reflect all new features, architecture, and usage instructions.
…ading, recursive processing, and cleanup of packs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant