Skip to content

Commit fd41227

Browse files
bug fix: write mode cannot close GUI
1 parent c996a4b commit fd41227

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

src/main/java/top/mpt/huihui/answerit/listener/InvOpen.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ public class InvOpen implements Listener {
1212
public void onInvClicked(InventoryClickEvent event){
1313
// 防止过分占用服务器资源,因为有的时候会疯狂报错
1414
if (prize.canPrize){
15-
1615
if (event.getInventory().equals(prize.getTargetPlayer().getInventory())){
1716
if (!(event.getCurrentItem() == null)){
1817
Player prizePlayer = prize.getPrizePlayer();

src/main/java/top/mpt/huihui/answerit/scheduler/Timer.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import top.mpt.huihui.answerit.utils.i18N;
88

99
import static top.mpt.huihui.answerit.Main.*;
10+
import static top.mpt.huihui.answerit.prize.prize.canPrize;
1011

1112
public class Timer extends BukkitRunnable {
1213

@@ -26,6 +27,8 @@ public void run() {
2627
// 清空数组
2728
voteResult.clear();
2829
voteList.clear();
30+
// 设置可以被奖励
31+
canPrize = true;
2932
ChatUtils.broadcast((String) i18N.getLang("timer.timer_over_summary"), trueCount, falseCount);
3033
if (trueCount == falseCount){
3134
ChatUtils.broadcast((String) i18N.getLang("timer.votes_equal"));

src/main/resources/lang/en_us.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ write:
3939
vote_right: "#GREEN#[RIGHT] "
4040
vote_wrong: "#RED#[WRONG]"
4141
# broadcast_info
42-
server_vote_right_info: "#GREEN#Player: #AQUA#%s #GREEN#vote for Correct"
43-
server_vote_wrong_info: "#GREEN#Player: #AQUA#%s #GREEN#vote for Incorrect"
42+
server_vote_right_info: "#GREEN#Player: #AQUA#%s #GREEN#vote for #AQUA#RIGHT"
43+
server_vote_wrong_info: "#GREEN#Player: #AQUA#%s #GREEN#vote for #RED#WRONG"
4444
# target_answer
4545
target_answer_info: "#GREEN#%s 's answer is #AQUA#%s"
4646

@@ -49,7 +49,7 @@ timer:
4949
timer_start_info: "#RED#Timing #AQUA#%d #RED#seconds, now start"
5050
timer_start_tip: "#RED#Please complete the voting within the specified time."
5151

52-
timer_over_summary: "#GREEN#Vote closed. %d players vote for RIGHT%d vote for WRONG"
52+
timer_over_summary: "#GREEN#Vote closed. %d players vote for RIGHT, %d vote for WRONG"
5353
votes_equal: "#GOLD#Equal votes, no reward or punishment for them."
5454
votes_right: "#GREEN#Answer correct!"
5555
votes_wrong: "#RED#Answer Incorrect!"

src/main/resources/lang/zh_cn.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ write:
3838
vote_right: "#GREEN#[正确] "
3939
vote_wrong: "#RED#[错误]"
4040
# broadcast_info
41-
server_vote_right_info: "#GREEN#玩家: #AQUA#%s #GREEN#投给了: 答案正确"
42-
server_vote_wrong_info: "#GREEN#玩家: #AQUA#%s #GREEN#投给了: 答案正确"
41+
server_vote_right_info: "#GREEN#玩家: #AQUA#%s #GREEN#投给了: #AQUA#答案正确"
42+
server_vote_wrong_info: "#GREEN#玩家: #AQUA#%s #GREEN#投给了: #RED#答案错误"
4343
# target_answer
4444
target_answer_info: "#GREEN#%s的回答是: #AQUA#%s"
4545

0 commit comments

Comments
 (0)