#Sync JSON file from URL on client startup (for CapeJS capes)

6 messages · Page 1 of 1 (latest)

sour pelican
#

Hi, I’m working on a modpack using CapeJS and I want to keep player cape data hosted remotely so I can update it without pushing new modpack versions.

I’d like KubeJS to support syncing a JSON file from a URL to the local file system (e.g., kubejs/assets/capejs/capes.json) on client startup.

Right now, this isn’t possible out of the box. I tried using Java interop with java.net.URL and Files.copy() but I couldn’t get it working reliably on startup or without running into issues.

It would be really helpful if KubeJS provided a built-in helper function or utility like:

FileUtils.download('https://example.com/capes.json', 'kubejs/assets/capejs/capes.json');

if anyone has an idea on how i could do this please tell me, would be really apreciated

lone matrixBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

full pier