Update for the Sponge Web API

The sponge dependencies now use two formats. This is adds support for the new one.
This commit is contained in:
ME1312 2019-04-18 10:10:00 -04:00
parent 463861744c
commit 6debb5b605
No known key found for this signature in database
GPG Key ID: FEFFE2F698E88FA8
2 changed files with 2 additions and 2 deletions

View File

@ -111,7 +111,7 @@ public class InternalSubCreator extends SubCreator {
System.out.println(name + File.separator + "Creator > Found \"sponge" + ((template.getType() == ServerType.FORGE)?"forge":"vanilla") + "-" + spversion.toString() + '"');
if (template.getType() == ServerType.FORGE) {
Version mcfversion = new Version(spprofile.getSection("dependencies").getRawString("minecraft") + '-' + spprofile.getSection("dependencies").getRawString("forge"));
Version mcfversion = new Version(((spprofile.getSection("dependencies").getRawString("forge").contains("-"))?"":spprofile.getSection("dependencies").getRawString("minecraft") + '-') + spprofile.getSection("dependencies").getRawString("forge"));
System.out.println(name + File.separator + "Creator > Found \"forge-" + mcfversion.toString() + '"');
var.put("mcf_version", mcfversion.toString());

View File

@ -258,7 +258,7 @@ public class SubCreator {
host.subdata.sendPacket(new PacketOutExLogMessage(address, "Found \"sponge" + ((template.getType() == ServerType.FORGE)?"forge":"vanilla") + "-" + spversion.toString() + '"'));
if (template.getType() == ServerType.FORGE) {
Version mcfversion = new Version(spprofile.getSection("dependencies").getRawString("minecraft") + '-' + spprofile.getSection("dependencies").getRawString("forge"));
Version mcfversion = new Version(((spprofile.getSection("dependencies").getRawString("forge").contains("-"))?"":spprofile.getSection("dependencies").getRawString("minecraft") + '-') + spprofile.getSection("dependencies").getRawString("forge"));
log.logger.info.println("Found \"forge-" + mcfversion.toString() + '"');
host.subdata.sendPacket(new PacketOutExLogMessage(address, "Found \"forge-" + mcfversion.toString() + '"'));