A library that makes it easy to retrieve skins and faces of minecraft players based on their uuid.
- Run
npm install pixelheads
- Use one of the functions to retrieve the skin or the face as a base64-encoded string.
import pixelheads from "pixelheads"; // Returns the entire skin of the player as a base64-encoded string. const playerSkin = pixelheads.getSkinAsBase64("uuid"); // Returns the face of the player as a base64-encoded string. const playerFace = pixelheads.getFaceAsBase64("uuid");
- Use one of the return values, e.g. in an
img
-tag:<img src="'data:image/png;base64,' + playerFace" alt="face of player"/>
Prerequisites:
- Git
- Node.js and npm
- TypeScript installed globally (
npm install -g typescript
)
Run the following commands:
git clone https://github.com/jojomatik/pixelheads
cd pixelheads
npm install
To build, run the following commands:
tsc
To pack the project as a tarball, run the following commands:
npm pack
This project is licensed under the MIT License (MIT). See also LICENSE
.