From c996a4bf7f1a7b496b1b3f614335acbb7aca4439 Mon Sep 17 00:00:00 2001
From: X_huihui <2519350300@qq.com>
Date: Sat, 8 Jul 2023 23:06:06 +0800
Subject: [PATCH] 1.5 Final Version Update
---
pom.xml | 2 +-
.../top/mpt/huihui/answerit/executor/CommandHandler.java | 9 +++++----
src/main/resources/lang/en_us.yml | 4 ++++
src/main/resources/lang/zh_cn.yml | 4 ++++
4 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/pom.xml b/pom.xml
index 58810ae..0357ec7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
top.mpt.huihui
answerit
- 1.41-SNAPSHOT
+ 1.5-SNAPSHOT
jar
Answerit
diff --git a/src/main/java/top/mpt/huihui/answerit/executor/CommandHandler.java b/src/main/java/top/mpt/huihui/answerit/executor/CommandHandler.java
index 2f8d8e6..7de6666 100644
--- a/src/main/java/top/mpt/huihui/answerit/executor/CommandHandler.java
+++ b/src/main/java/top/mpt/huihui/answerit/executor/CommandHandler.java
@@ -6,6 +6,7 @@
import top.mpt.huihui.answerit.commands.ICommand;
import top.mpt.huihui.answerit.commands.impl.*;
import top.mpt.huihui.answerit.utils.PlayerUtils;
+import top.mpt.huihui.answerit.utils.i18N;
import java.util.*;
@@ -52,7 +53,7 @@ public void registerCommand(ICommand command) {
* 使用帮助指令
*/
public void showHelp(CommandSender sender) {
- PlayerUtils.send(sender, "#BLUE#AnswerIt 你问我答 #GREEN#插件帮助");
+ PlayerUtils.send(sender, "#BLUE#AnswerIt #GREEN#Helper");
for (String key: commands.keySet()) {
sender.sendMessage(commands.get(key).showUsage());
}
@@ -88,7 +89,7 @@ public boolean onCommand(CommandSender sender, Command command, String label, St
}
} catch (Exception e) {
e.printStackTrace();
- PlayerUtils.send(sender, "#RED#发生了异常:%s", e.getMessage());
+ PlayerUtils.send(sender, "#RED#Got an Exception:%s", e.getMessage());
return true;
}
return true;
@@ -135,7 +136,7 @@ public List onTabComplete(CommandSender sender, Command command, String
//玩家可能会输错,找不到指令,那就不管了
if (cmd != null) {
if (Objects.equals(cmd.getCmdName(), "q")){
- return Collections.singletonList("请在这里输入问题(带问号)");
+ return Collections.singletonList(i18N.getLang("tab_tips.input_question").toString());
}
}
} else if (args.length == 4){
@@ -154,7 +155,7 @@ public List onTabComplete(CommandSender sender, Command command, String
if (cmd != null) {
if (Objects.equals(cmd.getCmdName(), "q")){
if (args[3].equals("Select") || args[3].equals("select")){
- return Collections.singletonList("请在这里输入答案(每个空格为1个答案)");
+ return Collections.singletonList(i18N.getLang("tab_tips.input_answer").toString());
}
}
}
diff --git a/src/main/resources/lang/en_us.yml b/src/main/resources/lang/en_us.yml
index 04e0aca..7c6a8a5 100644
--- a/src/main/resources/lang/en_us.yml
+++ b/src/main/resources/lang/en_us.yml
@@ -7,6 +7,10 @@ sender_err: "Please let players execute this command!"
mode_err: "#RED#Mode is wrong, please ask %s to check about."
player_err: "#RED#Cannot find players who named that. Or maybe the player isn't online."
+tab_tips:
+ input_question: "Please enter the question here"
+ input_answer: "Please enter the answer here (one answer per space)"
+
global:
receiver_info:
- "#YELLOW#You received a question from #AQUA#[%s]"
diff --git a/src/main/resources/lang/zh_cn.yml b/src/main/resources/lang/zh_cn.yml
index 41e944e..43a9ac4 100644
--- a/src/main/resources/lang/zh_cn.yml
+++ b/src/main/resources/lang/zh_cn.yml
@@ -6,6 +6,10 @@ sender_err: "请让玩家执行指令!"
mode_err: "#RED#提问类型有误,请让%s检查一下。"
player_err: "#RED#找不到玩家或玩家不在线"
+tab_tips:
+ input_question: "请在这里输入问题(带问号)"
+ input_answer: "请在这里输入答案(每个空格为1个答案)"
+
global:
receiver_info:
- "#YELLOW#您收到了来自#AQUA#[%s]#YELLOW#的提问"