1
1
mirror of https://github.com/geekfrog/PermissionsTime.git synced 2025-09-08 18:45:38 +00:00

低版本兼容 fix bug

This commit is contained in:
GeekFrog
2017-07-16 10:38:19 +08:00
parent 277d091ce7
commit 27f573c26b
5 changed files with 15 additions and 8 deletions

View File

@ -28,7 +28,7 @@ public class SqlManager {
}
public boolean updateDatabase() {
if (db != null && db.isOpen()) {
if (db != null) {
db.close();
}
if (PluginCfg.USE_MYSQL) {
@ -38,7 +38,7 @@ public class SqlManager {
db = new SQLite(PluginMain.LOG, "[" + pm.PLUGIN_NAME + "] ", pm.getDataFolder().getAbsolutePath(), "playerData", ".db");
pds = new SqlitePlayerDataDao(pm, this);
}
if(db.open()) {
if (db.open()) {
try {
if (!pds.tableExist()) {
pds.creatTable();