Skip to content
38 changes: 32 additions & 6 deletions minecraft-modrinth/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,41 @@
# Minecraft Modrinth (by Boy132)

Easily download and install Minecraft mods and plugins directly from Modrinth within the server panel.
Easily download, update, and manage Minecraft mods and plugins directly from Modrinth within the server panel.

## Setup

Add `modrinth_mods` or `modrinth_plugins` to the _features_ of your egg to enable the mod/plugins page.
Add `modrinth_mods` or `modrinth_plugins` to the _features_ of your egg to enable the mod/plugins page.
Also make sure your egg has the `minecraft` _tag_ and a _tag_ for the [mod loader](https://github.com/pelican-dev/plugins/blob/main/minecraft-modrinth/src/Enums/MinecraftLoader.php#L10-L16). (e.g. `paper` or `neoforge`)

## Features

- Browse and search Modrinth's extensive mod library
- Download mods and plugins directly to your server
- Automatic version compatibility checking
- Seamless installation to the correct server directory
- **Browse and Search**: Access Modrinth's extensive mod library with search and pagination
- **Smart Installation**: One-click install with automatic latest version selection
- **Status Tracking**: See which mods are installed directly in the Modrinth list
- **Update Detection**: Automatic detection of available updates with one-click upgrade
- **Easy Uninstall**: Remove mods/plugins with confirmation and automatic file cleanup
- **Metadata Management**: Tracks installed versions, filenames, and installation dates
- **Version Compatibility**: Automatic filtering by Minecraft version and mod loader
- **Seamless Installation**: Downloads to the correct server directory (mods/ or plugins/)
- **Multilingual**: Supports English and German translations

## How It Works

### Installing Mods/Plugins
1. Browse or search for mods in the Modrinth list
2. Click the **Install** button (download icon)
3. The latest compatible version is automatically downloaded and tracked

### Managing Installed Mods
- **Installed** (green check): Mod is installed and up-to-date
- **Update** (orange refresh): Newer version available - click to upgrade
- **Uninstall** (red trash): Remove mod from server

### Metadata Tracking
The plugin maintains a `.modrinth-metadata.json` file in your mods/plugins folder that tracks:
- Project ID and name
- Installed version ID and number
- Filename
- Installation date

This enables accurate update detection and prevents duplicate installations
28 changes: 25 additions & 3 deletions minecraft-modrinth/lang/de/strings.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
'loader' => 'Loader',
'installed' => 'Installiert :type',
'unknown' => 'Unbekannt',
'view_all' => 'Alle',
'view_installed' => 'Installiert',
'mod_unavailable' => 'Dieser Mod/Plugin ist auf Modrinth nicht mehr verfügbar',
],

'table' => [
Expand All @@ -36,11 +39,30 @@
],

'actions' => [
'download' => 'Herunterladen',
'install' => 'Installieren',
'installed' => 'Installiert',
'update' => 'Aktualisieren',
'uninstall' => 'Deinstallieren',
],

'modals' => [
'update_heading' => 'Mod/Plugin aktualisieren',
'update_description' => 'Dies ersetzt Version :old_version durch Version :new_version. Die alte Datei wird gelöscht.',
'uninstall_heading' => 'Mod/Plugin deinstallieren',
'uninstall_description' => 'Möchten Sie :name wirklich deinstallieren? Dies wird die Datei dauerhaft von Ihrem Server löschen.',
],

'notifications' => [
'download_started' => 'Download gestartet',
'download_failed' => 'Download konnte nicht gestartet werden',
'install_success' => 'Installation abgeschlossen',
'install_success_body' => ':name Version :version erfolgreich installiert',
'install_failed' => 'Installation fehlgeschlagen',
'install_failed_body' => 'Bei der Installation ist ein Fehler aufgetreten. Bitte versuchen Sie es erneut oder wenden Sie sich an den Support, wenn das Problem weiterhin besteht.',
'update_success' => 'Aktualisierung abgeschlossen',
'update_success_body' => 'Erfolgreich auf Version :version aktualisiert',
'update_failed' => 'Aktualisierung fehlgeschlagen',
'update_failed_body' => 'Bei der Aktualisierung ist ein Fehler aufgetreten. Bitte versuchen Sie es erneut oder wenden Sie sich an den Support, wenn das Problem weiterhin besteht.',
'uninstall_success' => 'Deinstallation abgeschlossen',
'uninstall_failed' => 'Deinstallation fehlgeschlagen',
'uninstall_failed_body' => 'Bei der Deinstallation ist ein Fehler aufgetreten. Bitte versuchen Sie es erneut oder wenden Sie sich an den Support, wenn das Problem weiterhin besteht.',
],
];
28 changes: 25 additions & 3 deletions minecraft-modrinth/lang/en/strings.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
'loader' => 'Loader',
'installed' => 'Installed :type',
'unknown' => 'Unknown',
'view_all' => 'All',
'view_installed' => 'Installed',
'mod_unavailable' => 'This mod/plugin is no longer available on Modrinth',
],

'table' => [
Expand All @@ -36,11 +39,30 @@
],

'actions' => [
'download' => 'Download',
'install' => 'Install',
'installed' => 'Installed',
'update' => 'Update',
'uninstall' => 'Uninstall',
],

'modals' => [
'update_heading' => 'Update Mod/Plugin',
'update_description' => 'This will replace version :old_version with version :new_version. The old file will be deleted.',
'uninstall_heading' => 'Uninstall Mod/Plugin',
'uninstall_description' => 'Are you sure you want to uninstall :name? This will permanently delete the file from your server.',
],

'notifications' => [
'download_started' => 'Download started',
'download_failed' => 'Download could not be started',
'install_success' => 'Installation completed',
'install_success_body' => 'Successfully installed :name version :version',
'install_failed' => 'Installation failed',
'install_failed_body' => 'An error occurred during installation. Please try again or contact support if the issue persists.',
'update_success' => 'Update completed',
'update_success_body' => 'Successfully updated to version :version',
'update_failed' => 'Update failed',
'update_failed_body' => 'An error occurred during the update. Please try again or contact support if the issue persists.',
'uninstall_success' => 'Uninstall completed',
'uninstall_failed' => 'Uninstall failed',
'uninstall_failed_body' => 'An error occurred during uninstallation. Please try again or contact support if the issue persists.',
],
];
4 changes: 2 additions & 2 deletions minecraft-modrinth/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"id": "minecraft-modrinth",
"name": "Minecraft Modrinth",
"author": "Boy132",
"version": "1.0.0",
"description": "Easily download minecraft mods & plugins from modrinth",
"version": "1.1.0",
"description": "Easily download, update, and manage minecraft mods & plugins from modrinth",
"category": "plugin",
"url": "https://github.com/pelican-dev/plugins/tree/main/minecraft-modrinth",
"update_url": null,
Expand Down
Loading