Изменение имени wrapper'а

This commit is contained in:
Gravit 2018-09-20 18:52:52 +07:00
parent 303402310b
commit 6e648e17ad
3 changed files with 10 additions and 1 deletions

View file

@ -29,7 +29,6 @@
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.zip.CRC32;
import org.apache.commons.io.FileUtils;
import ru.gravit.launcher.LauncherAPI;
import ru.gravit.launcher.hasher.HashedDir;
import ru.gravit.utils.helper.CommonHelper;
@ -95,6 +94,8 @@ public static final class Config extends ConfigObject {
@LauncherAPI
public final String authRejectString;
@LauncherAPI
public final String projectName;
@LauncherAPI
public final String whitelistRejectString;
@LauncherAPI
public final boolean genMappings;
@ -135,6 +136,7 @@ private Config(BlockConfigEntry block, Path coredir) {
launch4j = new ExeConf(block.getEntry("launch4J", BlockConfigEntry.class));
sign = new SignConf(block.getEntry("signing", BlockConfigEntry.class), coredir);
binaryName = block.getEntryValue("binaryName", StringConfigEntry.class);
projectName = block.hasEntry("projectName") ? block.getEntryValue("projectName", StringConfigEntry.class) : "Minecraft";
compress = block.getEntryValue("compress", BooleanConfigEntry.class);
}

View file

@ -55,6 +55,12 @@ public void setAddress(String address)
body.append(address);
body.append("\";");
}
public void setProjectName(String name)
{
body.append("this.projectname = \"");
body.append(name);
body.append("\";");
}
public void setPort(int port)
{

View file

@ -134,6 +134,7 @@ private void stdBuild() throws IOException {
server.buildHookManager.preHook(context);
jaConfigurator.setAddress(server.config.getAddress());
jaConfigurator.setPort(server.config.port);
jaConfigurator.setProjectName(server.config.projectName);
server.buildHookManager.registerAllClientModuleClass(jaConfigurator);
try (ZipInputStream input = new ZipInputStream(
IOHelper.newInput(IOHelper.getResourceURL("Launcher.jar")))) {