Added a null check to ManageConDebugCommand

Prevents NPE when checking if server is a proxy after plugin failed
to enable.

Affected issues:
- Close #1090
This commit is contained in:
Rsl1122 2019-07-08 11:12:56 +03:00
parent ec31108f7f
commit 7107dcbe6b

View File

@ -81,7 +81,8 @@ public class ManageConDebugCommand extends CommandNode {
this.webServer = webServer;
this.dbSystem = dbSystem;
setShortHelp(locale.getString(serverInfo.getServer().isProxy() ? CmdHelpLang.CON : CmdHelpLang.MANAGE_CON));
boolean isProxy = serverInfo.getServer() != null && serverInfo.getServer().isProxy();
setShortHelp(locale.getString(isProxy ? CmdHelpLang.CON : CmdHelpLang.MANAGE_CON));
setInDepthHelp(locale.getArray(DeepHelpLang.MANAGE_CON));
}