Skip to content

Commit

Permalink
1.5 Final Version Update
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaohuihui1022 committed Jul 8, 2023
1 parent 73ddc45 commit c996a4b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>top.mpt.huihui</groupId>
<artifactId>answerit</artifactId>
<version>1.41-SNAPSHOT</version>
<version>1.5-SNAPSHOT</version>
<packaging>jar</packaging>

<name>Answerit</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.*;

Expand Down Expand Up @@ -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());
}
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -135,7 +136,7 @@ public List<String> 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){
Expand All @@ -154,7 +155,7 @@ public List<String> 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());
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions src/main/resources/lang/en_us.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]"
Expand Down
4 changes: 4 additions & 0 deletions src/main/resources/lang/zh_cn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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#的提问"
Expand Down

0 comments on commit c996a4b

Please sign in to comment.