BackInv 1.1
一款用于服务器的简单玩家备份模组。
支持单人游戏。
我是服务器的技术管理员,遇到了一个问题:在 Fabric 1.21 版本中,只有 Death Backup 可用,而它对服务器并不十分友好。
命令:
/backinv <target> - 打开一个图形界面,列出玩家的备份(推荐)。
/backinv reload - 重新加载配置文件(config/backinv/config.json),无需重启服务器。
/backinv list <target> - 显示玩家备份的文本列表(无图形界面)。
/backinv load <target> <index> - 将指定的备份加载到玩家的物品栏中。
/backinv inv <target> <index> - 为玩家打开特定备份的图形界面预览。
配置
配置文件位于 <游戏或服务器目录>/config/backinv/config.json。
| 名称 |
描述 |
类型 |
| enabled |
启用(true)或禁用(false)BackInv 模组。 |
boolean |
| prefix |
在消息中显示的前缀文本。 |
String |
| suffix |
在消息中显示的后缀文本。 |
String |
| re_join_message |
玩家重新连接时显示的消息。 |
String |
| load_player_message |
从文件加载玩家物品栏时显示的消息。支持占位符:{player}、{file}。 |
String |
| error_load_player_message |
加载玩家物品栏失败时显示的消息。支持占位符:{player}、{file}、{e}。 |
String |
| item_prefix |
应用于备份中显示的物品的前缀。 |
String |
| item_suffix |
应用于备份中显示的物品的后缀。 |
String |
| no_saves_found |
未找到玩家的任何备份时显示的消息。支持占位符:{player}。 |
String |
| invalid_index |
提供了无效的备份索引时显示的消息。支持占位符:{index}。 |
String |
| save_not_found |
找不到指定的备份时显示的消息。支持占位符:{save}。 |
String |
| error_occurred |
操作失败时显示的通用错误消息。支持占位符:{action}。 |
String |
{
"enabled": true,
"prefix": "§6[§aBackInv§6] ",
"suffix": "§7",
"re_join_message": "Sorry come back again",
"load_player_message": "Player {player} inventory is loaded from file {file}."
}
"error_load_player_message":"无法为玩家 {player} 保存文件 {file} - 错误:{e}",
"item_prefix":"§7",
"item_suffix":"§6",
"no_saves_found":"§c未找到玩家 {player} 的已保存背包",
"invalid_index":"§c无效的存档索引 - {index}",
"save_not_found":"§c未找到存档 - {save}",
"error_occurred":"§c在执行 {action} 时发生错误"
}
这是我的第一个模组,我是边学边做的,所以犯了不少错误,而且并非所有内容都经过测试(但我会修复所有 bug!)。
BackInv 1.1
A simple player backup mod for your server.
Work in single player.
I am a technical administrator of the server and encountered the problem that on Fabric 1.21, there is only Death Backup, which is not very server-friendly.
Commands:
/backinv <target> - Opens a graphical interface listing the player's backups (Recommended).
/backinv reload - Reloads the configuration file (config/backinv/config.json) without restarting the server.
/backinv list <target> - Displays a text-based list of the player's backups (No GUI).
/backinv load <target> <index> - Loads a specific backup into the player's inventory.
/backinv inv <target> <index> - Opens a GUI preview of a specific backup for the player.
Configuration
The configuration is located in <game or server directory>/config/backinv/config.json.
| Name |
Description |
Type |
| enabled |
Enables (true) or disables (false) the BackInv mod. |
boolean |
| prefix |
The prefix text displayed in messages. |
String |
| suffix |
The suffix text displayed in messages. |
String |
| re_join_message |
The message displayed when a player reconnects. |
String |
| load_player_message |
The message displayed when a player’s inventory is loaded from a file. Supports placeholders: {player}, {file}. |
String |
| error_load_player_message |
The message displayed when loading a player’s inventory fails. Supports placeholders: {player}, {file}, {e}. |
String |
| item_prefix |
Prefix applied to items displayed in backups. |
String |
| item_suffix |
Suffix applied to items displayed in backups. |
String |
| no_saves_found |
The message displayed when no backups are found for a player. Supports placeholder: {player}. |
String |
| invalid_index |
The message displayed when an invalid backup index is provided. Supports placeholder: {index}. |
String |
| save_not_found |
The message displayed when a specified backup cannot be found. Supports placeholder: {save}. |
String |
| error_occurred |
The generic error message displayed when an action fails. Supports placeholder: {action}. |
String |
{
"enabled":true,
"prefix":"§6[§aBackInv§6] ",
"suffix":"§7",
"re_join_message":"Sorry come back again",
"load_player_message":"Player {player} inventory is loaded from file {file}.",
"error_load_player_message":"Failed to save inventory for player {player} file {file} - Error- {e}",
"item_prefix":"§7",
"item_suffix":"§6",
"no_saves_found":"§cNo saved inventories found for player {player}",
"invalid_index":"§cInvalid save index- {index}",
"save_not_found":"§cSave not found- {save}",
"error_occurred":"§cAn error occurred while {action}"
}
This is my first mod, and I was learning as I went along, so I made many mistakes and not everything is tested (but I will fix all the bugs!).
评论 0
登录后参与评分
还没有评论,来抢沙发吧