Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

将回复消息独立出代码,使用单独文件夹存储,并增加英语支持,根据mcdr的语言,插件也会自动切换语言 #29

Merged
merged 4 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 116 additions & 0 deletions lang/en_us.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@

region_backup:

register_message: Read through commands related to RBU

lack_permission: You have no permission to use this command!

help_message: |
------ {1} {2} ------
A region-measured §aplugin for §abackups
§3Author: FRUITS_CANDY
§d【Format specification】
#sc=!!rb<>st=Click to run#§7{0} §a§l[▷] §eShow help message
#sc=!!rb make<>st=Click to run#§7{0} make §b<Chunk radius> <comment> §a§l[▷] §eTake the player's block as the center and backup the area where the block with a side length of 2 times radius+1 is located
#sc=!!rb dim_make<>st=Click to run#§7{0} dim_make §b<dimension:0 for overworld,-1 for the nether,1 for the end> <comment> §a§l[▷] §eBackup all regions of a given dimension, using commas to distinguish between dimensions §aEtc. 0 or 0,-1
#sc=!!rb pos_make<>st=Click to run#§7{0} pos_make §b<x1 coordinates> <z1 coordinates> <x2 coordinates> <z2 coordinates> <dimension:See the previous instruction for the format> <comment> §a§l[▷] §eGiven two coordinate points, backup a rectangular area formed by taking the corresponding area coordinates of the two coordinate points as vertices
#sc=!!rb back<>st=Click to run#§7{0} back §b<Slot> §a§l[▷] §eBackup region assigned to corresponding slot
#sc=!!rb restore<>st=Click to run#§7{0} restore §b<Slot> §a§l[▷] §eRestore the save to the primary state
#sc=!!rb del<>st=Click to run#§7{0} del §b<Slot> §a§l[▷] §eDelete slot
#sc=!!rb confirm<>st=Click to run#§7{0} confirm §a§l[▷] §eReconfirm to backup
#sc=!!rb abort<>st=Click to run#§7{0} abort §a§l[▷] §eYou can type in this command to stop backup at any time
#sc=!!rb list<>st=Click to run#§7{0} list §a§l[▷] §eDisplay back-up info for each slot respectively
#sc=!!rb reload<>st=Click to run#§7{0} reload §a§l[▷] §eReload RBU

default_comment: §7Empty

default_info: Empty

backup_error:

source_error: §c§lThis command can only be typed in by real player!

radius_error: §cThe backup radius must be an integar greater than or equal to zero!

invalid_pos: §cInvalid back-up sets, failed to find corresponding region on the basis of input coordinates

repeat_backup: §c§lBackup files in queue, do not send reduplicative order!

dim_error: §cInvalid dimension input

dim_repeat: §cRepeated dimension input

timeout: "[RBU] §cBack-up files timeout, the order has been cancelled"

unknown_error: "Error occurred, error info:§c{}"

back_error:

dim_error: §cInvalid dimension input

lack_info: §cFailed to backup :The slot lacks info.json file,or the slot is missing!

lack_region: §cCannot back-up file because the slot is empty!

timeout: §aBack-up files timeout,the order has been cancelled!

repeat_back: §c§lBack-up files in queue,do not send reduplicative order!

unknown_error: Error occured,error info:§c{}

server_error: Server shutdown abnormally,the backup has stopped

wrong_dim: Please check info.json to ensure it contains right dimension info

del_error:

lack_slot: §4§lSlot{} inexists

other_error: Error occured when deleting backups, error info:§c{}

list_error: Error occured when displaying back-up list, error info:§c{}

reload_error: Failed to reload RBU, error info:§c{}

backup:

start: "[RBU] §fProcessing§a backups...Please wait..."

date: "[RBU] Date: {}; comment: {}"

done: "[RBU] §aBackup §fcompleted,which takes §6{}§f seconds"

back:

start: "[RBU] Plan to restore the save to slot §6{}§f,Date {}; comment: {}"

click: "[RBU] Use #sc=!!rb confirm<>st=Click to confirm#§7!!rb confirm §fConfirm §cbackup§f,#sc=!!rb abort<>st=Click to cancel#§7!!rb abort §fcancel"

abort: §aBackup cancelled

countdown: §cThe server will close in 10 seconds!

count: "§aThe server will close in {} seconds,Type in #sc=!!rb abort<>st=to stop backup#§c!!rb abort§f to stop backup to slot §6{}"

run: §aExecuting files replacement

del: §4§lSlot{} Delete successfully

abort: There's nothing to abort

confirm: There's nothing to confirm

list:

empty_slot: No slot exists

first: §d【SlotInfo】

slot_info: "#st=Backup dimension:{0}#[Slot§6{1}§f] #sc=!!rb back {1}<>st=Backup toSlot§6{1}#§a[▷] #sc=!!rb del {1}<>st=Delete slot§6{1}#§c[x] ##§a{2} §f{3} comment:{4}"

empty_size: "[Slot§6{}§f] Empty"

total_size: "Total space occupied by backups: §a{}"

reload: §a§lRBU has reloaded!

116 changes: 116 additions & 0 deletions lang/zh_cn.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@

region_backup:

register_message: 查看与区域备份有关的指令

lack_permission: 你没有运行该指令的权限

help_message: |
------ {1} {2} ------
一个以区域为单位的§a备份回档§a插件
§3作者: FRUITS_CANDY
§d【格式说明】
#sc=!!rb<>st=点击运行指令#§7{0} §a§l[▷] §e显示帮助信息
#sc=!!rb make<>st=点击运行指令#§7{0} make §b<区块半径> <注释> §a§l[▷] §e以玩家所在区块为中心,备份边长为2倍半径+1的区块所在区域
#sc=!!rb dim_make<>st=点击运行指令#§7{0} dim_make §b<维度:0主世界,-1地狱,1末地> <注释> §a§l[▷] §e备份给定维度的所有区域,维度间用,做区分 §a例 0 或 0,-1
#sc=!!rb pos_make<>st=点击运行指令#§7{0} pos_make §b<x1坐标> <z1坐标> <x2坐标> <z2坐标> <维度:格式见上条指令> <注释> §a§l[▷] §e给定两个坐标点,备份以两坐标点对应的区域坐标为顶点形成的矩形区域
#sc=!!rb back<>st=点击运行指令#§7{0} back §b<槽位> §a§l[▷] §e回档指定槽位所对应的区域
#sc=!!rb restore<>st=点击运行指令#§7{0} restore §b<槽位> §a§l[▷] §e使存档还原到回档前状态
#sc=!!rb del<>st=点击运行指令#§7{0} del §b<槽位> §a§l[▷] §e删除某槽位
#sc=!!rb confirm<>st=点击运行指令#§7{0} confirm §a§l[▷] §e再次确认是否回档
#sc=!!rb abort<>st=点击运行指令#§7{0} abort §a§l[▷] §e在任何时候键入此指令可中断回档
#sc=!!rb list<>st=点击运行指令#§7{0} list §a§l[▷] §e显示各槽位的存档信息
#sc=!!rb reload<>st=点击运行指令#§7{0} reload §a§l[▷] §e重载插件

default_comment: §7空

default_info: 无

backup_error:

source_error: §c§l该指令只能由玩家输入!

radius_error: §c备份半径应为大于等于0的整数!

invalid_pos: §c本次备份无效,根据输入的坐标,未找到对应的区域

repeat_backup: §c§l备份正在进行,请不要重复备份!

dim_error: §c维度输入错误

dim_repeat: §c维度输入重复

timeout: "[RBU] §c备份§f超时,已取消备份"

unknown_error: "备份出错,错误信息: §c{}"

back_error:

dim_error: §c维度输入错误

lack_info: §c该槽位无info.json文件或槽位不存在,无法回档

lack_region: §c该槽位无区域文件,无法回档

timeout: §a回档超时,已取消本次回档

repeat_back: §c§l回档正在进行,请不要重复回档!

unknown_error: 回档出错,错误信息:§c{}

server_error: 服务端关闭异常,回档终止

wrong_dim: 请检查info.json里的维度信息是否正确

del_error:

lack_slot: §4§l槽位{}不存在

unknown_error: 删除备份时出错,错误信息:§c{}

list_error: 显示备份列表出错,错误信息:§c{}

reload_error: 重载插件失败,错误信息:§c{}

backup:

start: "[RBU] §a备份§f中...请稍等"

date: "[RBU] 日期: {}; 注释: {}"

done: "[RBU] §a备份§f完成,耗时§6{}§f秒"

back:

start: "[RBU] 准备将存档恢复至槽位§6{}§f,日期 {}; 注释: {}"

click: "[RBU] 使用#sc=!!rb confirm<>st=点击确认#§7!!rb confirm §f确认§c回档§f,#sc=!!rb abort<>st=点击取消#§7!!rb abort §f取消"

abort: §a回档已取消

countdown: §c服务器将于10秒后关闭回档!

count: "§a服务器还有{}秒关闭,输入#sc=!!rb abort<>st=终止回档#§c!!rb abort§f来停止回档到槽位§6{}"

run: §a正在运行文件替换

del: §4§l槽位{}删除成功

abort: 没有什么好中断的

confirm: 没有什么好确认的

list:

empty_slot: 没有槽位存在

first: §d【槽位信息】

slot_info: "#st=备份维度:{0}#[槽位§6{1}§f] #sc=!!rb back {1}<>st=回档至槽位§6{1}#§a[▷] #sc=!!rb del {1}<>st=删除槽位§6{1}#§c[x] ##§a{2} §f{3} 注释: {4}"

empty_size: "[槽位§6{}§f] 空"

total_size: "备份占用总空间: §a{}"

reload: §a§l插件已重载

11 changes: 6 additions & 5 deletions mcdreforged.plugin.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
{
"id": "region_backup",
"version": "1.6.1",
"name": "Region-BackUp",
"version": "1.7.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

版本号跨度太大了

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不懂哪里大了?这不是正常更新吗?
1.6.1是bug fix
1.7.0算是功能增强啊

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

算了你想咋定咋定吧

"name": "Region BackUp",
"description": {
"en_us": "An MCDR plugin that backs up or backs up files on a regional basis",
"zh_cn": "一个以区域为单位备份或回档的MCDR插件"
},
"author": [
"GHS-Official"
"FRUITS_CANDY","Bexerlmao","mc_doge_","SeeU_SAMA"
],
"link": "https://github.com/GHS-Official/Region-BackUp",
"dependencies": {
"mcdreforged": ">=2.6.0"
},
"archive_name": "Region_BackUp-v{version}",
"archive_name": "Region-BackUp-v{version}",
"resources": [
"LICENSE"
"LICENSE",
"lang"
]
}
Loading
Loading