A way to manage and run skin servers for MCPI Reborn.
- Wallee/Red-exe-Engineer
- Run with no arguments to start the HTTP server.
- Upload a skin file through CLI or HTTP/POST.
- Delete skins from the local database.
- List all skin names with their URL-safe base64 identifiers.
$ git clone https://github.com/Red-exe-Engineer/skin-server.git
$ cd skin-server
$ python main.pyTo get the skin server to work with MCPI-Reborn you need to set the environment variable MCPI_SKIN_SERVER to the server's address/port.
$ MCPI_SKIN_SERVER=localhost:8080 ./minecraft-pi-reborn-x-y-z.AppImage # Replace with path to your MCPI-Reborn executable.The address/port config is in main.py. I couldn't be bothered to add more CLI arguments or a proper config.
You can also set ALLOW_QUERY to True/False to enable GET requests for /player and /players
| Long | Short | Arguments | Description |
|---|---|---|---|
| --upload | -u | skin_file, optional:name | Uploads a skin to the database. Will use the file name if no name is given. |
| --delete | -d | skin_name | Deletes a skin from the database. |
| --list | -l | List all skin names and URL-safe base64 encoded titles. | |
| --help | -h | Displays help information. |
Returns a friendly server message.
Returns a list of registered skins as clickable HTML links.
Redirects internally to the base64-encoded skin, returning the raw PNG.
Returns the skin PNG.
Uploads a skin using JSON:
{
"name": "<skin_name>",
"data": "<base64_png_data>"
}Example:
$ curl -X POST http://localhost:8080/upload/ \
-H "Content-Type: application/json" \
-d '{"name": "Alex", "data": "'"$(base64 -w 0 Alex.png)"'"}'MCPI-Reborn requires your Github and MCPI username be the same to get a working skin.
While this is a great authentication method, my own Github username (Red-exe-Engineer) is a bit long, and I prefer going by "Wallee" in games or online.
So, why should you use it? I don't know. You figure it out. :D