RePlugin - Resource Pack Distributor
RePlugin is a Paper plugin designed to automate the distribution of resource packs from both GitHub Releases and local directories. Made in Japan.
Features
- π GitHub Releases Direct Distribution β Sends direct download URLs from GitHub Releases to clients.
- π¦ Local Server Integration β Serves local resource packs via a built-in HTTP server.
- π Automatic SHA1 Hashing β Calculates hashes for all packs automatically upon server startup.
- π‘ Multi-Pack Distribution β Distributes multiple packs at 1-second intervals upon player connection.
- βοΈ Multi-GitHub Release Support β Supports distributing files from multiple releases using owner/repo/tag/filename.
Setup
1. Building the Plugin
mvn clean package
Place the generated target/RePlugin-1.0.0.jar into your plugins/ directory.
2. Configuration
After the initial server startup, the following files and folders will be generated automatically:
plugins/RePlugin/
βββ config.yml # GitHub and server settings
βββ packs.yml # Individual pack configurations
βββ packs/ # Folder for local packs
βββ tuki.zip
βββ bgm-pack.zip
βββ ...
config.yml - GitHub Releases and Server Settings
Configure multiple GitHub sources and the local delivery server:
github:
enabled: true
sources:
- owner: "swmr71" # GitHub username
repo: "MinecraftKaguya" # Repository name
tag: "Mirrorv1" # Release tag
filename: "tuki.zip" # Filename
- owner: "your-user"
repo: "your-repo"
tag: "v1.0.0"
filename: "bgm-pack.zip"
# Local resource pack delivery server
server:
host: "localhost" # Bind host
port: 8765 # Bind port
GitHub Releases URL: https://github.com/{owner}/{repo}/releases/download/{tag}/{filename} Local Pack URL: http://{server.host}:{server.port}/{filename}
packs.yml - Individual Pack Settings
packs:
my-texture-pack.zip:
enabled: true
url: "https://clusters-prj.com/resourcepacks/my-texture-pack.zip"
bgm-pack.zip:
enabled: true
url: "https://clusters-prj.com/resourcepacks/bgm-pack.zip"
global:
reject-action: "warn" # Action to take if a player declines the pack
3. Placing Resource Packs
Distributing via GitHub Releases
Configure the owner, repository, and tag in config.yml. The plugin will automatically fetch them at startup. Only .zip files are supported.
Distributing via Local Folder
Simply place your .zip files in the plugins/RePlugin/packs/ directory.
Workflow
At Server Startup:
ββ Load config.yml
ββ Start the local HTTP server (Default: localhost:8765)
ββ Fetch and download files from GitHub Releases
β ββ Set direct URLs for GitHub Releases
ββ Scan the local folder
β ββ Configure URLs for delivery via the built-in HTTP server
ββ Calculate SHA1 hashes for all packs
At Player Connection:
ββ Add player to the queue
ββ Distribute all packs to the player at 1-second intervals
(Balances load even during simultaneous logins)
Commands
/replugin reload # Reload configurations (Under development)
/replugin list # List loaded resource packs (Under development)
/replugin test <player> # Test distribution for a specific player (Under development)
Troubleshooting
Cannot download from GitHub
- Verify that owner and repo in config.yml are correct.
- Ensure the release is accessible via public GitHub API.
- Check the server's network connection.
Pack is not being distributed
- Ensure enabled: true is set in packs.yml.
- Verify the url is correct and accessible by the client.
- Check the server console for any error logs.
SHA1 hash calculation failed
- Ensure the .zip file is not corrupted.
- Check file permissions for the packs/ directory.
License
MIT License
Author
clusters-prj