mirror of
https://github.com/ME1312/SubServers-2.git
synced 2024-11-22 02:08:27 +01:00
Fix template updater
This commit is contained in:
parent
f4011f419c
commit
74ddbc9bd4
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -123,12 +123,12 @@ public final class SubPlugin extends BungeeCord implements Listener {
|
||||
System.out.println("SubServers > Updated ~/SubServers/Templates/Vanilla");
|
||||
}
|
||||
if (new UniversalFile(dir, "Templates:Spigot:template.yml").exists() && (new Version((new YAMLConfig(new UniversalFile(dir, "Templates:Spigot:template.yml"))).get().getString("Version", "0")).compareTo(new Version("2.13a+"))) != 0) {
|
||||
Files.move(new UniversalFile(dir, "Templates:Vanilla").toPath(), new UniversalFile(dir, "Templates:Spigot.old" + Math.round(Math.random() * 100000)).toPath());
|
||||
Files.move(new UniversalFile(dir, "Templates:Spigot").toPath(), new UniversalFile(dir, "Templates:Spigot.old" + Math.round(Math.random() * 100000)).toPath());
|
||||
Util.unzip(SubPlugin.class.getResourceAsStream("/net/ME1312/SubServers/Bungee/Library/Files/Templates/spigot.zip"), new UniversalFile(dir, "Templates"));
|
||||
System.out.println("SubServers > Updated ~/SubServers/Templates/Spigot");
|
||||
}
|
||||
if (new UniversalFile(dir, "Templates:Sponge:template.yml").exists() && (new Version((new YAMLConfig(new UniversalFile(dir, "Templates:Sponge:template.yml"))).get().getString("Version", "0")).compareTo(new Version("2.13a+"))) != 0) {
|
||||
Files.move(new UniversalFile(dir, "Templates:Vanilla").toPath(), new UniversalFile(dir, "Templates:Sponge.old" + Math.round(Math.random() * 100000)).toPath());
|
||||
Files.move(new UniversalFile(dir, "Templates:Sponge").toPath(), new UniversalFile(dir, "Templates:Sponge.old" + Math.round(Math.random() * 100000)).toPath());
|
||||
Util.unzip(SubPlugin.class.getResourceAsStream("/net/ME1312/SubServers/Bungee/Library/Files/Templates/sponge.zip"), new UniversalFile(dir, "Templates"));
|
||||
System.out.println("SubServers > Updated ~/SubServers/Templates/Sponge");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user