[FIX] Удален legacyAddress/legacyPort

This commit is contained in:
Gravit 2019-06-28 16:08:29 +07:00
parent 96c2aac849
commit ddb4bc9728
No known key found for this signature in database
GPG key ID: 061981E1E85D3216

View file

@ -99,11 +99,6 @@ public void reload() throws Exception {
public static final class Config { public static final class Config {
private transient LaunchServer server = null; private transient LaunchServer server = null;
public int legacyPort;
private String legacyAddress;
private String legacyBindAddress;
public String projectName; public String projectName;
@ -169,15 +164,6 @@ public AuthProviderPair getAuthProviderPair() {
public String startScript; public String startScript;
public String getLegacyAddress() {
return legacyAddress;
}
public String getLegacyBindAddress() {
return legacyBindAddress;
}
public void setProjectName(String projectName) { public void setProjectName(String projectName) {
this.projectName = projectName; this.projectName = projectName;
} }
@ -191,13 +177,7 @@ public void setEnv(LauncherConfig.LauncherEnvironment env) {
} }
public void setLegacyAddress(String legacyAddress) {
this.legacyAddress = legacyAddress;
}
public void verify() { public void verify() {
VerifyHelper.verify(getLegacyAddress(), VerifyHelper.NOT_EMPTY, "LaunchServer address can't be empty");
if (auth == null || auth[0] == null) { if (auth == null || auth[0] == null) {
throw new NullPointerException("AuthHandler must not be null"); throw new NullPointerException("AuthHandler must not be null");
} }
@ -736,8 +716,6 @@ private void generateConfigIfNotExists(boolean testEnv) throws IOException {
newConfig.protectHandler = new StdProtectHandler(); newConfig.protectHandler = new StdProtectHandler();
if (testEnv) newConfig.permissionsHandler = new DefaultPermissionsHandler(); if (testEnv) newConfig.permissionsHandler = new DefaultPermissionsHandler();
else newConfig.permissionsHandler = new JsonFilePermissionsHandler(); else newConfig.permissionsHandler = new JsonFilePermissionsHandler();
newConfig.legacyPort = 7240;
newConfig.legacyBindAddress = "0.0.0.0";
newConfig.binaryName = "Launcher"; newConfig.binaryName = "Launcher";
newConfig.whitelistRejectString = "Вас нет в белом списке"; newConfig.whitelistRejectString = "Вас нет в белом списке";
@ -788,7 +766,6 @@ private void generateConfigIfNotExists(boolean testEnv) throws IOException {
newConfig.projectName = "MineCraft"; newConfig.projectName = "MineCraft";
} }
newConfig.legacyAddress = address;
newConfig.netty.address = "ws://" + address + ":9274/api"; newConfig.netty.address = "ws://" + address + ":9274/api";
newConfig.netty.downloadURL = "http://" + address + ":9274/%dirname%/"; newConfig.netty.downloadURL = "http://" + address + ":9274/%dirname%/";
newConfig.netty.launcherURL = "http://" + address + ":9274/Launcher.jar"; newConfig.netty.launcherURL = "http://" + address + ":9274/Launcher.jar";