mirror of
https://github.com/ME1312/SubServers-2.git
synced 2024-11-29 05:36:13 +01:00
Do not generate default templates if the templates folder already exists
This commit is contained in:
parent
8b65ec04dd
commit
83bd4e8fff
@ -88,7 +88,8 @@ public final class SubPlugin extends BungeeCord {
|
|||||||
}
|
}
|
||||||
lang = new YAMLConfig(new UniversalFile(dir, "lang.yml"));
|
lang = new YAMLConfig(new UniversalFile(dir, "lang.yml"));
|
||||||
|
|
||||||
if (!(new UniversalFile(dir, "Templates").exists())) new UniversalFile(dir, "Templates").mkdirs();
|
if (!(new UniversalFile(dir, "Templates").exists())) {
|
||||||
|
new UniversalFile(dir, "Templates").mkdirs();
|
||||||
if (!(new UniversalFile(dir, "Templates:Vanilla:template.yml").exists())) {
|
if (!(new UniversalFile(dir, "Templates:Vanilla:template.yml").exists())) {
|
||||||
Util.unzip(SubPlugin.class.getResourceAsStream("/net/ME1312/SubServers/Bungee/Library/Files/Templates/vanilla.zip"), new UniversalFile(dir, "Templates"));
|
Util.unzip(SubPlugin.class.getResourceAsStream("/net/ME1312/SubServers/Bungee/Library/Files/Templates/vanilla.zip"), new UniversalFile(dir, "Templates"));
|
||||||
System.out.println("SubServers > Created ~/SubServers/Templates/Vanilla");
|
System.out.println("SubServers > Created ~/SubServers/Templates/Vanilla");
|
||||||
@ -113,6 +114,7 @@ public final class SubPlugin extends BungeeCord {
|
|||||||
Util.unzip(SubPlugin.class.getResourceAsStream("/net/ME1312/SubServers/Bungee/Library/Files/Templates/sponge.zip"), new UniversalFile(dir, "Templates"));
|
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");
|
System.out.println("SubServers > Updated ~/SubServers/Templates/Sponge");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (new UniversalFile(dir, "Recently Deleted").exists()) {
|
if (new UniversalFile(dir, "Recently Deleted").exists()) {
|
||||||
int f = new UniversalFile(dir, "Recently Deleted").listFiles().length;
|
int f = new UniversalFile(dir, "Recently Deleted").listFiles().length;
|
||||||
|
Loading…
Reference in New Issue
Block a user