Back to mods
FilesJS project artwork

Modrinth · Minecraft mod

FilesJS

Allow you to use kubejs for some restrictive operations on files

Choose a version Pick your version below, then grab the matching file.

Quick answer

Which FilesJS release should I use?

Updated 1 year ago
Latest stable file 1.3
Game version 1.20.1
Loader Forge

FilesJS 1.3 targets 1.20.1 with Forge. Installation on the client is optional. Installation on the dedicated server is optional. No extra mods listed for this file.

Where it goes

Is FilesJS required on the client, server, or both?

Installation on the client is optional. Installation on the dedicated server is optional.

Client Optional
Dedicated server Optional
Loader for this release Forge
Required install it here Optional supported, not mandatory Not supported do not install here Source doesn’t say do not assume

The source marks this as usable on both the client and server.

What else does FilesJS 1.3 need?

1.3. Change the file and its required mods may change too.

No extra mods listed for this file

This file does not list any required mods. Do not add a library just because a different file uses it.

This file does not list any required or optional mods.

Before you install it

Add FilesJS without breaking your instance.

Built for FilesJS 1.3. Pick another file and the loader, install side or required mods may change.

  1. 01

    Stick to this file

    Use 1.3. It targets 1.20.1 with Forge; another release may have different loader, side or dependency requirements.

  2. 02

    Bring the mods it needs

    This file does not list any required mods. Do not add a library just because a different file uses it.

  3. 03

    Put it on the correct side

    Installation on the client is optional. Installation on the dedicated server is optional.

  4. 04

    Pick the file you checked

    Use the “Get this file” button beside 1.3. It opens that exact file at the source.

About this project

What does FilesJS add?

This is a plugin mod for kubejs that allows you to perform limited operations on files using kubejs.

The file reading and writing can only be done within the instance folder of Minecraft, and external file contents cannot be accessed.

Write multiple lines

FilesJS.writeLines("kubejs/server_scripts/src/test.js", ["test1,test2,test3"])

Delete file

FilesJS.delete("kubejs/server_scripts/src/test.js")

Change event trigger

ItemEvents.rightClicked('nether_star',event=>{
        FilesJS.backupFile("kubejs/README.txt")
})
    
Files.fileBackupCreated(event=>{
        event.server.tell("File backup path:",event.getPath())
})

You can't even access the mods folder!

Compared to directly accessing file content, this mod considers various security issues and restricts access to special extensions

Project description from Modrinth.

Pick your setup

FilesJS by Minecraft version and loader

Choose the version and loader you play, then open the matching release.

11 available setups

Check the dependencies, then try the file in a copied instance before changing a world you care about.

Recent files

FilesJS versions and loaders

4 of 4 releases match

Looking for an older file? The official Modrinth project page is in Resources.