mirror of
https://github.com/ME1312/SubServers-2.git
synced 2024-11-22 02:08:27 +01:00
Use updated patch locations
The last three commits were changes to the way Vanilla-Patch.jar is downloaded. For compatability reasons, the old system will remain in place for now.
This commit is contained in:
parent
801858a421
commit
a5847b9219
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -91,9 +91,13 @@ public class InternalSubCreator extends SubCreator {
|
||||
System.out.println(name + File.separator + "Creator > Loading Template: " + template.getDisplayName());
|
||||
Util.copyDirectory(template.getDirectory(), dir);
|
||||
if (template.getType() == ServerType.VANILLA) {
|
||||
String patch = "Patch";
|
||||
if (version.compareTo(new Version("1.12")) >= 0) patch += "-v2";
|
||||
version = new Version(version.toString() + " " + patch);
|
||||
String commit;
|
||||
if (version.compareTo(new Version("1.12")) >= 0) {
|
||||
commit = "b8f7aa8b3988e164b04911cc47b54b4cc8a554a1";
|
||||
} else {
|
||||
commit = "df9797496a7c148aaeec73a13cda521275b12db8";
|
||||
}
|
||||
version = new Version(version.toString() + " " + commit);
|
||||
} else if (template.getType() == ServerType.SPONGE) {
|
||||
System.out.println(name + File.separator + "Creator > Searching Versions...");
|
||||
Document spongexml = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new InputSource(new StringReader(Util.readAll(new BufferedReader(new InputStreamReader(new URL("http://files.minecraftforge.net/maven/org/spongepowered/spongeforge/maven-metadata.xml").openStream(), Charset.forName("UTF-8")))))));
|
||||
|
Binary file not shown.
@ -60,7 +60,7 @@ public final class SubPlugin extends BungeeCord implements Listener {
|
||||
public SubServer sudo = null;
|
||||
//public static final Version version = new Version("2.13a");
|
||||
//public static final Version version = new Version(new Version("2.13a"), Version.VersionType.BETA, 1); // TODO Beta Version Setting
|
||||
public static final Version version = new Version(new Version(new Version("2.13a"), VersionType.PRE_RELEASE, 2), VersionType.BETA, 5); // TODO Beta Version Setting
|
||||
public static final Version version = new Version(new Version(new Version("2.13a"), VersionType.PRE_RELEASE, 2), VersionType.BETA, 6); // TODO Beta Version Setting
|
||||
|
||||
public boolean redis = false;
|
||||
public long resetDate = 0;
|
||||
@ -117,7 +117,7 @@ public final class SubPlugin extends BungeeCord implements Listener {
|
||||
Util.unzip(SubPlugin.class.getResourceAsStream("/net/ME1312/SubServers/Bungee/Library/Files/Templates/sponge.zip"), new UniversalFile(dir, "Templates"));
|
||||
System.out.println("SubServers > Created ~/SubServers/Templates/Sponge");
|
||||
} else {
|
||||
if (new UniversalFile(dir, "Templates:Vanilla:template.yml").exists() && (new Version((new YAMLConfig(new UniversalFile(dir, "Templates:Vanilla:template.yml"))).get().getString("Version", "0")).compareTo(new Version("2.12b+"))) != 0) {
|
||||
if (new UniversalFile(dir, "Templates:Vanilla:template.yml").exists() && (new Version((new YAMLConfig(new UniversalFile(dir, "Templates:Vanilla:template.yml"))).get().getString("Version", "0")).compareTo(new Version("2.13a+"))) != 0) {
|
||||
Files.move(new UniversalFile(dir, "Templates:Vanilla").toPath(), new UniversalFile(dir, "Templates:Vanilla.old" + Math.round(Math.random() * 100000)).toPath());
|
||||
Util.unzip(SubPlugin.class.getResourceAsStream("/net/ME1312/SubServers/Bungee/Library/Files/Templates/vanilla.zip"), new UniversalFile(dir, "Templates"));
|
||||
System.out.println("SubServers > Updated ~/SubServers/Templates/Vanilla");
|
||||
|
Binary file not shown.
@ -47,7 +47,7 @@ public final class SubPlugin extends JavaPlugin {
|
||||
super();
|
||||
//version = new Version(getDescription().getVersion());
|
||||
//version = new Version(new Version(getDescription().getVersion()), Version.VersionType.BETA, 1); // TODO Beta Version Setting
|
||||
version = new Version(new Version(new Version(getDescription().getVersion()), VersionType.PRE_RELEASE, 2), VersionType.BETA, 5); // TODO Beta Version Setting
|
||||
version = new Version(new Version(new Version(getDescription().getVersion()), VersionType.PRE_RELEASE, 2), VersionType.BETA, 6); // TODO Beta Version Setting
|
||||
}
|
||||
|
||||
/**
|
||||
|
Binary file not shown.
@ -53,7 +53,7 @@ public final class ExHost {
|
||||
|
||||
//public final Version version = new Version("2.13a");
|
||||
//public final Version version = new Version(new Version("2.13a"), Version.VersionType.BETA, 1); // TODO Beta Version Setting
|
||||
public final Version version = new Version(new Version(new Version("2.13a"), VersionType.PRE_RELEASE, 2), VersionType.BETA, 5); // TODO Beta Version Setting
|
||||
public final Version version = new Version(new Version(new Version("2.13a"), VersionType.PRE_RELEASE, 2), VersionType.BETA, 6); // TODO Beta Version Setting
|
||||
public final SubAPI api = new SubAPI(this);
|
||||
|
||||
private ConsoleReader jline;
|
||||
|
@ -213,9 +213,13 @@ public class SubCreator {
|
||||
host.subdata.sendPacket(new PacketOutExLogMessage(address, "Loading Template: " + template.getDisplayName()));
|
||||
Util.copyDirectory(template.getDirectory(), dir);
|
||||
if (template.getType() == ServerType.VANILLA) {
|
||||
String patch = "Patch";
|
||||
if (version.compareTo(new Version("1.12")) >= 0) patch += "-v2";
|
||||
version = new Version(version.toString() + " " + patch);
|
||||
String commit;
|
||||
if (version.compareTo(new Version("1.12")) >= 0) {
|
||||
commit = "b8f7aa8b3988e164b04911cc47b54b4cc8a554a1";
|
||||
} else {
|
||||
commit = "df9797496a7c148aaeec73a13cda521275b12db8";
|
||||
}
|
||||
version = new Version(version.toString() + " " + commit);
|
||||
} else if (template.getType() == ServerType.SPONGE) {
|
||||
thread.name().logger.info.println("Searching Versions...");
|
||||
host.subdata.sendPacket(new PacketOutExLogMessage(address, "Searching Versions..."));
|
||||
|
Binary file not shown.
@ -50,7 +50,7 @@ public final class SubPlugin extends BungeeCord implements Listener {
|
||||
public SubDataClient subdata = null;
|
||||
//public static final Version version = new Version("2.13a");
|
||||
//public static final Version version = new Version(new Version("2.13a"), Version.VersionType.BETA, 1); // TODO Beta Version Setting
|
||||
public static final Version version = new Version(new Version(new Version("2.13a"), VersionType.PRE_RELEASE, 2), VersionType.BETA, 5); // TODO Beta Version Setting
|
||||
public static final Version version = new Version(new Version(new Version("2.13a"), VersionType.PRE_RELEASE, 2), VersionType.BETA, 6); // TODO Beta Version Setting
|
||||
|
||||
|
||||
public long lastReload = -1;
|
||||
|
Loading…
Reference in New Issue
Block a user