@LauncherAPI public FileNameMatcher getUpdateMatcher() { String[] updateArray = update.stream(StringConfigEntry.class).toArray(String[]::new); String[] verifyArray = updateVerify.stream(StringConfigEntry.class).toArray(String[]::new); String[] exclusionsArray = updateExclusions.stream(StringConfigEntry.class).toArray(String[]::new); return new FileNameMatcher(updateArray, verifyArray, exclusionsArray); }
@LauncherAPI public void verify() { // Version getVersion(); IOHelper.verifyFileName(getAssetIndex()); // Client VerifyHelper.verify(getTitle(), VerifyHelper.NOT_EMPTY, "Profile title can't be empty"); VerifyHelper.verify( getServerAddress(), VerifyHelper.NOT_EMPTY, "Server address can't be empty"); VerifyHelper.verifyInt( getServerPort(), VerifyHelper.range(0, 65535), "Illegal server port: " + getServerPort()); // Updater and client watch service update.verifyOfType(ConfigEntry.Type.STRING); updateVerify.verifyOfType(ConfigEntry.Type.STRING); updateExclusions.verifyOfType(ConfigEntry.Type.STRING); // Client launcher jvmArgs.verifyOfType(ConfigEntry.Type.STRING); classPath.verifyOfType(ConfigEntry.Type.STRING); clientArgs.verifyOfType(ConfigEntry.Type.STRING); VerifyHelper.verify(getTitle(), VerifyHelper.NOT_EMPTY, "Main class can't be empty"); }
@LauncherAPI public String[] getJvmArgs() { return jvmArgs.stream(StringConfigEntry.class).toArray(String[]::new); }
@LauncherAPI public String[] getClassPath() { return classPath.stream(StringConfigEntry.class).toArray(String[]::new); }