Implement server announcement (#1420)

* implement server announcement

* Update src/main/java/emu/grasscutter/command/commands/AnnounceCommand.java

Co-authored-by: Luke H-W <Birdulon@users.noreply.github.com>

* Added arg numbers check

Co-authored-by: Luke H-W <Birdulon@users.noreply.github.com>
This commit is contained in:
Akka
2022-07-02 21:43:22 +08:00
committed by GitHub
parent a80302cdcd
commit 9bafc2c5d5
9 changed files with 335 additions and 1 deletions

View File

@@ -0,0 +1,22 @@
[
{
"templateId" : 1,
"type" : "CENTER",
"frequency" : 1,
"content": "Welcome to grasscutter PS!",
"beginTime": "2022-06-01T00:00:00+08:00",
"endTime": "2022-06-01T00:08:00+08:00",
"tick" : false,
"interval": 1
},
{
"templateId" : 2,
"type" : "COUNTDOWN",
"frequency" : 1,
"content": "Welcome to grasscutter PS!",
"beginTime": "2022-06-01T00:00:00+08:00",
"endTime": "2022-06-01T00:08:00+08:00",
"tick" : false,
"interval": 1
}
]

View File

@@ -117,6 +117,14 @@
"no_account": "Account not found.",
"description": "Modify user accounts"
},
"announce": {
"command_usage": "Usage: a <tpl templateId|refresh|revoke templateId|content>",
"send_success": "Send an announcement successfully, you can revoke it by /a revoke %s.",
"refresh_success": "Refresh announcement config file successfully. (Total %s)",
"revoke_done": "Try to revoke announcement %s.",
"description": "Send announcement to all online players, or manage server's announcement.",
"not_found": "Could not found announcement %s."
},
"clear": {
"command_usage": "Usage: clear <all|wp|art|mat>",
"weapons": "Cleared weapons for %s.",

View File

@@ -117,6 +117,14 @@
"no_account": "账号不存在。",
"description": "创建或删除账号"
},
"announce": {
"command_usage": "用法a <tpl templateId|refresh|revoke templateId|content>",
"send_success": "成功地发送了一则公告,你可以通过/a revoke %s来撤销。",
"refresh_success": "成功地刷新了公告配置。(共%s个)",
"revoke_done": "尝试撤回公告 %s。",
"description": "向所有在线玩家发送公告,或者管理服务器的公告。",
"not_found": "找不到公告 %s。"
},
"clear": {
"command_usage": "用法clear <all|wp|art|mat>\nall: 所有, wp: 武器, art: 圣遗物, mat: 材料",
"weapons": "已清除 %s 的武器。",