Fixed new NPE on Bungee caused by refactoring

This commit is contained in:
Rsl1122 2017-12-16 13:03:22 +02:00
parent 31ddad0b98
commit 6d34f1d4a0
3 changed files with 6 additions and 6 deletions

View File

@ -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;

View File

@ -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();
}

View File

@ -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());