Fixed Bungee not disabling things properly

This commit is contained in:
Rsl1122 2017-10-29 12:50:00 +02:00
parent 3236c61820
commit 9d3eb3b5a6
2 changed files with 13 additions and 2 deletions

View File

@ -27,6 +27,7 @@ import main.java.com.djrapitops.plan.utilities.Benchmark;
import net.md_5.bungee.api.ChatColor;
import java.io.InputStream;
import java.sql.SQLException;
import java.util.UUID;
/**
@ -133,6 +134,16 @@ public class PlanBungee extends BungeePlugin<PlanBungee> implements IPlan {
/*ignored*/
}
}
if (webServer != null) {
webServer.stop();
}
if (db != null) {
try {
db.close();
} catch (SQLException e) {
Log.toLog(this.getClass().getName(), e);
}
}
Log.info(Locale.get(Msg.DISABLED).toString());
}

View File

@ -5,9 +5,9 @@ import com.djrapitops.plugin.command.CommandUtils;
import com.djrapitops.plugin.command.ISender;
import com.djrapitops.plugin.command.SubCommand;
import com.djrapitops.plugin.task.AbsRunnable;
import com.djrapitops.plugin.utilities.Compatibility;
import main.java.com.djrapitops.plan.Log;
import main.java.com.djrapitops.plan.Permissions;
import main.java.com.djrapitops.plan.Plan;
import main.java.com.djrapitops.plan.api.IPlan;
import main.java.com.djrapitops.plan.data.WebUser;
import main.java.com.djrapitops.plan.database.tables.SecurityTable;
@ -39,7 +39,7 @@ public class RegisterCommand extends SubCommand {
Locale.get(Msg.CMD_USG_WEB_REGISTER).toString(),
"<password> [name] [access lvl]");
this.plugin = plugin;
if (plugin instanceof Plan) {
if (Compatibility.isBukkitAvailable()) {
setupFilter();
}
}