FilesJS

FilesJS

Mod

Allow you to use kubejs for some restrictive operations on files

Client and server Game MechanicsManagement

91 downloads
0 followers
Follow Save
90% of ad revenue goes to creators. Go ad-free while supporting creators with Modrinth Plus. Subscribe today!

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 members

xiaoliziawa

Member

Details

Licensed MIT
Published 2 months ago
Updated 2 months ago