-
Notifications
You must be signed in to change notification settings - Fork 15
Action FILE
fromgate edited this page Jun 4, 2017
·
6 revisions
This action is used when you need to perform actions on the server files.
FILE <action> <fileName> [fileNameTo]
Element | Possible Values | Description |
---|---|---|
action |
action:[remove / copy / move] |
Action on the file. |
fileName |
filename:[Path]<File.Ext> |
The path to the file or directory. The path is relative to the server root. When specifying a directory, you must be careful not to delete the files |
fileNameTo |
{...} |
The destination path to copy or move file. The path is relative to the server root. |
Placeholder | Description |
---|---|
%fullpath% | Absolute path to the file or directory. |
%removecount% | Shows the number of deleted files. |
%filedebug% | Shows the errors if it exists. |
- Delete all files from the directory
/world/playerdata
.
EXEC:
remove_players:
actions:
- FILE=action:remove fileName:{/world/playerdata}
- 'MESSAGE=&aPath to the files to be deleted: &r%fullpath%'
- 'MESSAGE=&aWe have removed &6&l%removecount% &afiles'
- Delete the .dat file of the player when you exit the game.
EXEC:
rem:
actions:
- PLAYER_ID=player:%player% online:false
- FILE=action:remove fileName:{/world/playerdata/%playerid%.dat}
QUIT:
rem_quit:
actions:
- execute=activator:rem
When a player leaves the game, the server stores information about his inventory, etc. In the file to be deleted, therefore, in order for the file to be deleted, it is necessary to let the server finish the record. In this case, I use the additional rem
activator.
- Copying and Moving a File
EXEC:
copy:
actions:
- file=action:copy fileName:{/test/1/3/1.txt} fileNameTo:{/test/1/4/5/2.txt}
move:
actions:
- file=action:move fileName:{/test/1/3/1.txt} fileNameTo:{/test/1/4/5/2.txt}
Links:
Download | Support | Twitter | VK | MinecraftMain Blog
© 2017, fromgate
http://reactions.fromgate.me
http://reactions.fromgate.ru
- Commands and Permission
- Activators
- Flags
- Actions
- Timers
- Menus
- Data formats
- Configuration
- Команды и пермишены
- Активаторы
- Флаги
- Действия
- Таймеры
- Меню
- Форматы данных
- Конфигурация