mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-28 12:07:35 +01:00
Fixed new NPE on Bungee caused by refactoring
This commit is contained in:
parent
31ddad0b98
commit
6d34f1d4a0
@ -38,10 +38,8 @@ public class ReloadCommand extends SubCommand {
|
||||
try {
|
||||
plugin.reloadPlugin(true);
|
||||
} catch (Exception e) {
|
||||
sender.sendMessage("§cSomething went wrong during reload of the plugin, a restart is recommended.");
|
||||
String address = plugin.getWebServer().getAccessAddress() + "/debug";
|
||||
sender.sendLink("More info can be found at ", address, address);
|
||||
Log.toLog(this.getClass().getName(), e);
|
||||
sender.sendMessage("§cSomething went wrong during reload of the plugin, a restart is recommended.");
|
||||
}
|
||||
sender.sendMessage(Locale.get(Msg.CMD_INFO_RELOAD_COMPLETE).toString());
|
||||
return true;
|
||||
|
@ -17,6 +17,7 @@ import main.java.com.djrapitops.plan.systems.SubSystem;
|
||||
import main.java.com.djrapitops.plan.systems.Systems;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
@ -29,6 +30,10 @@ public abstract class DBSystem implements SubSystem {
|
||||
protected SQLDB db;
|
||||
protected Set<SQLDB> databases;
|
||||
|
||||
public DBSystem() {
|
||||
databases = new HashSet<>();
|
||||
}
|
||||
|
||||
public static DBSystem getInstance() {
|
||||
return Systems.getInstance().getDatabaseSystem();
|
||||
}
|
||||
|
@ -9,8 +9,6 @@ import main.java.com.djrapitops.plan.database.databases.MySQLDB;
|
||||
import main.java.com.djrapitops.plan.database.databases.SQLiteDB;
|
||||
import main.java.com.djrapitops.plan.settings.Settings;
|
||||
|
||||
import java.util.HashSet;
|
||||
|
||||
/**
|
||||
* //TODO Class Javadoc Comment
|
||||
*
|
||||
@ -20,7 +18,6 @@ public class PlanDBSystem extends DBSystem {
|
||||
|
||||
@Override
|
||||
protected void initDatabase() throws DatabaseInitException {
|
||||
databases = new HashSet<>();
|
||||
databases.add(new MySQLDB());
|
||||
databases.add(new SQLiteDB());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user