Skip to content

Commit

Permalink
Merge branch 'master' into PM1E
Browse files Browse the repository at this point in the history
# Conflicts:
#	pom.xml
#	src/main/resources/plugin.yml
  • Loading branch information
lt-name committed Dec 29, 2023
2 parents 6b5a2e7 + 78c8621 commit b1727f9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.smallaswater</groupId>
<artifactId>RsNPC</artifactId>
<version>2.4.2-PM1E-SNAPSHOT</version>
<version>2.4.2-PM1E<!-- -SNAPSHOT--></version>

<name>RsNPC</name>
<description>RsNPC -- NPC plugin for Nukkit</description>
Expand Down Expand Up @@ -88,7 +88,7 @@
<dependency>
<groupId>cn.nukkit</groupId>
<artifactId>Nukkit</artifactId>
<version>PM1E_1.20.40.3355</version>
<version>PM1E_1.20.50.3397</version>
<scope>provided</scope>
</dependency>

Expand Down
16 changes: 10 additions & 6 deletions src/main/java/com/smallaswater/npc/data/RsNpcConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -207,19 +207,23 @@ public RsNpcConfig(@NonNull String name, @NonNull Config config) throws RsNpcCon
}

try {
if (!(config.get("点击执行指令") instanceof List)) {
throw new RuntimeException("点击执行指令 配置读取到的内容不是List类型!请检查您的配置格式是否正确!");
if (config.exists("点击执行指令")) {
if (!(config.get("点击执行指令") instanceof List)) {
throw new RuntimeException("点击执行指令 配置读取到的内容不是List类型!请检查您的配置格式是否正确!");
}
this.cmds.addAll(config.getStringList("点击执行指令"));
}
this.cmds.addAll(config.getStringList("点击执行指令"));
}catch (Exception e) {
throw new RsNpcConfigLoadException("NPC配置 点击执行指令加载失败!请检查配置文件!", e);
}

try {
if (!(config.get("发送消息") instanceof List)) {
throw new RuntimeException("发送消息 配置读取到的内容不是List类型!请检查您的配置格式是否正确!");
if (config.exists("发送消息")) {
if (!(config.get("发送消息") instanceof List)) {
throw new RuntimeException("发送消息 配置读取到的内容不是List类型!请检查您的配置格式是否正确!");
}
this.messages.addAll(config.getStringList("发送消息"));
}
this.messages.addAll(config.getStringList("发送消息"));
}catch (Exception e) {
throw new RsNpcConfigLoadException("NPC配置 发送消息加载失败!请检查配置文件!", e);
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: RsNPC
main: com.smallaswater.npc.RsNPC
version: "2.4.1-PM1E"
version: "2.4.2-PM1E"
api: ["Nukkit-PM1E"]
authors: ["若水", "LT_Name"]
load: POSTWORLD
Expand Down

0 comments on commit b1727f9

Please sign in to comment.