Skip to content

Adding capes

static edited this page Jul 28, 2026 · 3 revisions

Capes are added to users based on their UUID and the texture is loaded through the kubejs/assets folder. To get someone's UUID, I recommend using NameMC

Adding a cape type

If you need a template to make capes, you can use the template provided here. For a breakdown of the colors, check this file

Once you have your texture, place it in kubejs/assets/capejs/textures/capes/. If those folders don't exist, you will need to create them. The file needs to be lower case and end in .png.

Adding a cape to a user

To add a cape type to a user, you can use a KubeJS client script using the CapeJS.addCapes event. An example script is as follows:

CapeJS.addCapes(event => {
    event.register("8c641065-dba3-41f3-864f-edea4ddfc8bb", "your_cape_type_name");
});

The first parameter is your UUID, the second is the cape type.

Do not add the .png to the your_cape_type_name.

Adding capes from a web-hosted CSV

If you plan to add / remove from your registered capes frequently, you can use the new registerFromWeb method available to the CapeJS.addCapes event.

Here's an example:

your-client-script.js

CapeJS.addCapes(event => {
    event.registerFromWeb('https://raw.githubusercontent.com/YourName/YourRepo/refs/heads/your-branch/capes.csv');
});

capes.csv

Name,UUID,Cape
YourNameHere,your-uuid-here,capetype-name
AnotherUser,your-other-uuid-here,capetype-name

Please note that the name column is purely there to keep track of the corresponding username, and is not actually used in the cape registry. Please ensure your file is UTF-8.

Clone this wiki locally