Revert "[FIX] Удалил неиспользуемый параметр из ServerWrapper."

This reverts commit 03a70c1d73.
This commit is contained in:
Zaxar163 2019-05-03 12:23:04 +03:00
parent 0e126482ef
commit b5014175d0

View file

@ -172,7 +172,7 @@ public void run(String... args) throws Throwable {
auth(); auth();
}; };
} }
LogHelper.info("ServerWrapper: LaunchServer address: %s. Title: %s", config.websocket.address, config.title); LogHelper.info("ServerWrapper: Project %s, LaunchServer address: %s. Title: %s", config.projectname, config.websocket.address, config.title);
LogHelper.info("Minecraft Version (for profile): %s", wrapper.profile == null ? "unknown" : wrapper.profile.getVersion().name); LogHelper.info("Minecraft Version (for profile): %s", wrapper.profile == null ? "unknown" : wrapper.profile.getVersion().name);
LogHelper.info("Start Minecraft Server"); LogHelper.info("Start Minecraft Server");
LogHelper.debug("Invoke main method %s", mainClass.getName()); LogHelper.debug("Invoke main method %s", mainClass.getName());
@ -193,7 +193,7 @@ public void updateLauncherConfig() {
LauncherConfig cfg = null; LauncherConfig cfg = null;
try { try {
cfg = new LauncherConfig(config.websocket.address, SecurityHelper.toPublicRSAKey(IOHelper.read(publicKeyFile)), new HashMap<>()); cfg = new LauncherConfig(config.websocket.address, SecurityHelper.toPublicRSAKey(IOHelper.read(publicKeyFile)), new HashMap<>(), config.projectname);
if(config.websocket != null && config.websocket.enabled) if(config.websocket != null && config.websocket.enabled)
{ {
cfg.isNettyEnabled = true; cfg.isNettyEnabled = true;
@ -221,6 +221,7 @@ public Config getConfig() {
public Config getDefaultConfig() { public Config getDefaultConfig() {
Config newConfig = new Config(); Config newConfig = new Config();
newConfig.title = "Your profile title"; newConfig.title = "Your profile title";
newConfig.projectname = "MineCraft";
newConfig.login = "login"; newConfig.login = "login";
newConfig.password = "password"; newConfig.password = "password";
newConfig.mainclass = ""; newConfig.mainclass = "";
@ -242,6 +243,7 @@ public void setConfig(Config config) {
public static final class Config { public static final class Config {
public String title; public String title;
public String projectname;
public WebSocketConf websocket; public WebSocketConf websocket;
public int reconnectCount; public int reconnectCount;
public int reconnectSleep; public int reconnectSleep;