Перейти к содержимому
Mineforgian

FilesJS

Allow you to use kubejs for some restrictive operations on files

Загрузки
64K
Подписчики
4
Обновлён
2 марта 2025 г.
Лицензия
MIT

Опубликован 9 декабря 2024 г.

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

Ченджлог

1.2.3Релиз1.21.2, 1.21.3, 1.21.4 · 13 декабря 2024 г.

Add event monitoring for file operations

1.2.2Релиз1.20.1 · 11 декабря 2024 г.

Add support for shaderpacks folder and. ts file suffix

Комментарии

Загружаем…