Language

FilesJS

FilesJS

Modrinth

Allow you to use kubejs for some restrictive operations on files

62.0k downloads 3 followers updated 15mo ago
latest v1.3 Modrinth
Forge 1.20.1 – 1.21.4 Game-mechanicsManagement

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

Versions

Release
1.3
forge · 1.20.1 · 15mo ago
53.6k
Release
1.2.3
forge · 1.20.1, 1.20.2, 1.20.3 · 18mo ago
Add event monitoring for file operations
8.2k
Release
1.2.2
forge · 1.20.1 · 18mo ago
Add support for shaderpacks folder and. ts file suffix
77
Beta
1.1
forge · 1.20.1 · 18mo ago
90

Comments 0

No comments yet. Be the first to share your thoughts.

Download FilesJS

Files are served directly from the original source. Modgrid does not host or modify them.