Compatibility
Minecraft: Java Edition
1.21–1.21.4
1.20.1–1.20.6
Platforms
Supported environments
Links
Creators
Details
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())
})



