Skip to content

Commit 4572ba7

Browse files
authored
更新至版本1.2.6
修复了一个小bug
1 parent ea92478 commit 4572ba7

File tree

14 files changed

+55
-20
lines changed

14 files changed

+55
-20
lines changed

src/main/java/org/c15412/Plugin2/Lottery/彩票系统.java

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -169,24 +169,26 @@ public void run() {
169169
} else 发信息(玩家, "§c请拿着有效彩票再来使用开奖指令! ");
170170
}
171171
} else 发信息(sender, "§c§l只有在游戏中的玩家可以使用本功能!");
172-
if ("彩票记录查询彩票记录".contains(label) && sender.hasPermission("LotteryS.checkLottery")) {
173-
if (获取.提取数字(args[0]).length() > 0) {
174-
if (Long.parseLong(获取.提取数字(args[0])) < 99)
175-
IntStream.rangeClosed(0, Integer.parseInt(获取.提取数字(args[0]))).forEach(i -> 发信息(sender, String.format("§b第:§3%s §b期彩票开奖号码为: %s", 开奖时间[99 - i], Arrays.toString(开奖结果[99 - i]))));
176-
else {
177-
final String[] 对应开奖结果 = {"aaaaaaaaaa"};
178-
String 对应开奖结果2 = null;
179-
try {
180-
对应开奖结果2 = 表格.executeQuery(String.format("SELECT * FROM PrizeHistory WHERE TIME == %s;", args[0])).getString("result");
181-
对应开奖结果[0] = 对应开奖结果2.replace("[", "").replace(", ", "").replace("]", "").trim();
182-
} catch (Exception ignored) {
172+
if ("彩票记录查询彩票记录".contains(label)) {
173+
if (sender.hasPermission("LotteryS.checkLottery")) {
174+
if (获取.提取数字(args[0]).length() > 0) {
175+
if (Long.parseLong(获取.提取数字(args[0])) < 99)
176+
IntStream.rangeClosed(0, Integer.parseInt(获取.提取数字(args[0]))).forEach(i -> 发信息(sender, String.format("§b第:§3%s §b期彩票开奖号码为: %s", 开奖时间[99 - i], Arrays.toString(开奖结果[99 - i]))));
177+
else {
178+
final String[] 对应开奖结果 = {"aaaaaaaaaa"};
179+
String 对应开奖结果2 = null;
180+
try {
181+
对应开奖结果2 = 表格.executeQuery(String.format("SELECT * FROM PrizeHistory WHERE TIME == %s;", args[0])).getString("result");
182+
对应开奖结果[0] = 对应开奖结果2.replace("[", "").replace(", ", "").replace("]", "").trim();
183+
} catch (Exception ignored) {
184+
}
185+
if (!对应开奖结果[0].equals("aaaaaaaaaa"))
186+
发信息(sender, String.format("§b第:§3%s §b期彩票开奖号码为: %s", args[0], 对应开奖结果2));
187+
else 发信息(sender, String.format("§c彩票期数 %s 错误,不存在该期彩票! ", args[0]));
183188
}
184-
if (!对应开奖结果[0].equals("aaaaaaaaaa"))
185-
发信息(sender, String.format("§b第:§3%s §b期彩票开奖号码为: %s", args[0], 对应开奖结果2));
186-
else 发信息(sender, String.format("§c彩票期数 %s 错误,不存在该期彩票! ", args[0]));
187-
}
188-
}else 发信息(sender, String.format("§c彩票期数 %s 错误,不存在该期彩票! ", args[0]));
189-
} else 发信息(sender, "§c您无权限查询彩票记录和历史开奖结果!");
189+
} else 发信息(sender, String.format("§c彩票期数 %s 错误,不存在该期彩票! ", args[0]));
190+
} else 发信息(sender, "§c您无权限查询彩票记录和历史开奖结果!");
191+
}
190192
}
191193
}.runTaskAsynchronously(获取.插件);
192194

src/main/resources/plugin.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: LotteryS
22
author: '15412'
33
main: org.c15412.Plugin2.Lottery.MainClass
4-
version: '1.2.5'
4+
version: '1.2.6'
55
api-version: '1.16'
66

77
permissions:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

target/classes/plugin.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: LotteryS
2+
author: '15412'
3+
main: org.c15412.Plugin2.Lottery.MainClass
4+
version: '1.2.6'
5+
api-version: '1.16'
6+
7+
permissions:
8+
LotteryS.*:
9+
children:
10+
LotteryS.checkLottery: true
11+
LotteryS.checkLottery:
12+
description: '允许玩家查看彩票记录'
13+
default: false
14+
15+
commands:
16+
彩票:
17+
description: '购买彩票'
18+
usage: '/彩票 [选号,十个数字(不想选的可以输入R或不填写)]'
19+
aliases:
20+
- '买彩票'
21+
- 'cp'
22+
- 'lottery'
23+
- 'lt'
24+
- 'lotterytickets'
25+
- '彩票开奖'
26+
- '开奖'
27+
- 'kj'
28+
- '彩票记录查询'
29+
- '查询彩票记录'
30+
- '查询彩票'
31+
- '彩票查询'
32+
33+

target/maven-archiver/pom.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#Generated by Maven
2-
#Wed Mar 24 16:07:27 CST 2021
2+
#Wed Mar 24 21:54:10 CST 2021
33
groupId=org.c15412.Plugin2.Lottery
44
artifactId=LotteryS
5-
version=1.2.0-SNAPSHOT
5+
version=1.2.6-SNAPSHOT

0 commit comments

Comments
 (0)