Skip to content

Commit

Permalink
修复未安装PAPI时无法启动的错误
Browse files Browse the repository at this point in the history
  • Loading branch information
R-Josef committed May 22, 2020
1 parent 1f2e4bb commit 81174db
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>moe.feo</groupId>
<artifactId>BBSToper</artifactId>
<version>3.5.1</version>
<version>3.5.2</version>
<repositories>
<repository>
<id>spigot-repo</id>
Expand Down
2 changes: 1 addition & 1 deletion resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: BBSToper
main: moe.feo.bbstoper.BBSToper
version: 3.5.1
version: 3.5.2
author: Fengshuai(R_Josef)
website: https://www.mcbbs.net/thread-789082-1-1.html
softdepend: [PlaceholderAPI]
Expand Down
5 changes: 4 additions & 1 deletion src/moe/feo/bbstoper/sql/SQLManager.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package moe.feo.bbstoper.sql;

import org.bukkit.Bukkit;
import org.bukkit.scheduler.BukkitRunnable;
import org.bukkit.scheduler.BukkitTask;

Expand Down Expand Up @@ -34,7 +35,9 @@ public static void initializeSQLer() {// 初始化或重载数据库
Crawler.setSQLer(sql);
Poster.setSQLer(sql);
Reminder.setSQLer(sql);
PAPIExpansion.setSQLer(sql);
if (Bukkit.getPluginManager().getPlugin("PlaceholderAPI") != null) {
PAPIExpansion.setSQLer(sql);
}
} catch (Exception e) {
e.printStackTrace();
} finally {
Expand Down

0 comments on commit 81174db

Please sign in to comment.