Skip to content

Commit c996a4b

Browse files
1.5 Final Version Update
1 parent 73ddc45 commit c996a4b

File tree

4 files changed

+14
-5
lines changed

4 files changed

+14
-5
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>top.mpt.huihui</groupId>
88
<artifactId>answerit</artifactId>
9-
<version>1.41-SNAPSHOT</version>
9+
<version>1.5-SNAPSHOT</version>
1010
<packaging>jar</packaging>
1111

1212
<name>Answerit</name>

src/main/java/top/mpt/huihui/answerit/executor/CommandHandler.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import top.mpt.huihui.answerit.commands.ICommand;
77
import top.mpt.huihui.answerit.commands.impl.*;
88
import top.mpt.huihui.answerit.utils.PlayerUtils;
9+
import top.mpt.huihui.answerit.utils.i18N;
910

1011
import java.util.*;
1112

@@ -52,7 +53,7 @@ public void registerCommand(ICommand command) {
5253
* 使用帮助指令
5354
*/
5455
public void showHelp(CommandSender sender) {
55-
PlayerUtils.send(sender, "#BLUE#AnswerIt 你问我答 #GREEN#插件帮助");
56+
PlayerUtils.send(sender, "#BLUE#AnswerIt #GREEN#Helper");
5657
for (String key: commands.keySet()) {
5758
sender.sendMessage(commands.get(key).showUsage());
5859
}
@@ -88,7 +89,7 @@ public boolean onCommand(CommandSender sender, Command command, String label, St
8889
}
8990
} catch (Exception e) {
9091
e.printStackTrace();
91-
PlayerUtils.send(sender, "#RED#发生了异常:%s", e.getMessage());
92+
PlayerUtils.send(sender, "#RED#Got an Exception:%s", e.getMessage());
9293
return true;
9394
}
9495
return true;
@@ -135,7 +136,7 @@ public List<String> onTabComplete(CommandSender sender, Command command, String
135136
//玩家可能会输错,找不到指令,那就不管了
136137
if (cmd != null) {
137138
if (Objects.equals(cmd.getCmdName(), "q")){
138-
return Collections.singletonList("请在这里输入问题(带问号)");
139+
return Collections.singletonList(i18N.getLang("tab_tips.input_question").toString());
139140
}
140141
}
141142
} else if (args.length == 4){
@@ -154,7 +155,7 @@ public List<String> onTabComplete(CommandSender sender, Command command, String
154155
if (cmd != null) {
155156
if (Objects.equals(cmd.getCmdName(), "q")){
156157
if (args[3].equals("Select") || args[3].equals("select")){
157-
return Collections.singletonList("请在这里输入答案(每个空格为1个答案)");
158+
return Collections.singletonList(i18N.getLang("tab_tips.input_answer").toString());
158159
}
159160
}
160161
}

src/main/resources/lang/en_us.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ sender_err: "Please let players execute this command!"
77
mode_err: "#RED#Mode is wrong, please ask %s to check about."
88
player_err: "#RED#Cannot find players who named that. Or maybe the player isn't online."
99

10+
tab_tips:
11+
input_question: "Please enter the question here"
12+
input_answer: "Please enter the answer here (one answer per space)"
13+
1014
global:
1115
receiver_info:
1216
- "#YELLOW#You received a question from #AQUA#[%s]"

src/main/resources/lang/zh_cn.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ sender_err: "请让玩家执行指令!"
66
mode_err: "#RED#提问类型有误,请让%s检查一下。"
77
player_err: "#RED#找不到玩家或玩家不在线"
88

9+
tab_tips:
10+
input_question: "请在这里输入问题(带问号)"
11+
input_answer: "请在这里输入答案(每个空格为1个答案)"
12+
913
global:
1014
receiver_info:
1115
- "#YELLOW#您收到了来自#AQUA#[%s]#YELLOW#的提问"

0 commit comments

Comments
 (0)