Uses Node.js to generate Minecraft server banners.
There is an official Docker image available here: gmem/minecraftbanner.
Or you can do:
git clone git@github.com:GGServers/MinecraftBanner.git
cd MinecraftBanner/src/
npm install
npm start
A banner template consists of two things:
- A .png of the background
- A .json telling the script how to render text
- (Optional) A GIMP/Photoshop file for the image
- (Optional) Font file for image
Both files should be named the same thing with their respective file extensions.
The .png background does not need to be specific dimensions, however it is favorable to display them as rectangles.
The JSON file is where you can specify the location for text to go.
{
"name": "classic",
"width": "500",
"height": "200",
"font": "Titillium-Web.ttf",
"ip": {
"x": 10,
"y": 40,
"size":40,
"r":255,
"g":255,
"b":255
},
"status": {
"x": 20,
"y": 110,
"size":40,
"r":0,
"g":0,
"b":0
},
"players": {
"x": 20,
"y": 160,
"size":25,
"r":255,
"g":255,
"b":255
}
}
Name is (currently) optional, width and height are to be used. Font tells the script which font family to use, the specific .ttf file should be located in the template/fonts
folder.
Each "section" block tells the script where to render the text, the size (in px), and the color in which to do it (RGB).