Update GalaxiEngine

This commit is contained in:
ME1312 2020-02-17 19:07:26 -05:00
parent 65a5b7d0c9
commit caf8ee793d
No known key found for this signature in database
GPG Key ID: FEFFE2F698E88FA8
6 changed files with 20 additions and 20 deletions

View File

@ -30,14 +30,14 @@
<dependency>
<groupId>net.ME1312.Galaxi</groupId>
<artifactId>GalaxiUtil</artifactId>
<version>20w08a</version>
<version>20w08c</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>net.ME1312.Galaxi</groupId>
<artifactId>GalaxiEngine</artifactId>
<version>20w08a</version>
<version>20w08c</version>
<scope>provided</scope>
</dependency>
<dependency>

View File

@ -56,22 +56,22 @@ public class ExternalSubCreator extends SubCreator {
@Override
public void reload() {
if (host.available) {
templates.clear();
if (new UniversalFile(host.plugin.dir, "SubServers:Templates").exists()) for (File file : new UniversalFile(host.plugin.dir, "SubServers:Templates").listFiles()) {
try {
if (file.isDirectory() && !file.getName().endsWith(".x")) {
ObjectMap<String> config = (new UniversalFile(file, "template.yml").exists())?new YAMLConfig(new UniversalFile(file, "template.yml")).get().getMap("Template", new ObjectMap<String>()):new ObjectMap<String>();
ServerTemplate template = new ServerTemplate(file.getName(), config.getBoolean("Enabled", true), config.getRawString("Icon", "::NULL::"), file, config.getMap("Build", new ObjectMap<String>()), config.getMap("Settings", new ObjectMap<String>()));
templates.put(file.getName().toLowerCase(), template);
if (config.getKeys().contains("Display")) template.setDisplayName(config.getString("Display"));
}
} catch (Exception e) {
System.out.println(host.getName() + "/Creator > Couldn't load template: " + file.getName());
e.printStackTrace();
templates.clear();
if (new UniversalFile(host.plugin.dir, "SubServers:Templates").exists()) for (File file : new UniversalFile(host.plugin.dir, "SubServers:Templates").listFiles()) {
try {
if (file.isDirectory() && !file.getName().endsWith(".x")) {
ObjectMap<String> config = (new UniversalFile(file, "template.yml").exists())?new YAMLConfig(new UniversalFile(file, "template.yml")).get().getMap("Template", new ObjectMap<String>()):new ObjectMap<String>();
ServerTemplate template = new ServerTemplate(file.getName(), config.getBoolean("Enabled", true), config.getRawString("Icon", "::NULL::"), file, config.getMap("Build", new ObjectMap<String>()), config.getMap("Settings", new ObjectMap<String>()));
templates.put(file.getName().toLowerCase(), template);
if (config.getKeys().contains("Display")) template.setDisplayName(config.getString("Display"));
}
} catch (Exception e) {
System.out.println(host.getName() + "/Creator > Couldn't load template: " + file.getName());
e.printStackTrace();
}
}
if (host.available) {
host.queue(new PacketExConfigureHost(host.plugin, host));
host.queue(new PacketExDownloadTemplates(host.plugin, host));
}

View File

@ -48,7 +48,7 @@
<dependency>
<groupId>net.ME1312.Galaxi</groupId>
<artifactId>GalaxiUtil</artifactId>
<version>20w08a</version>
<version>20w08c</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>

View File

@ -30,7 +30,7 @@
<dependency>
<groupId>net.ME1312.Galaxi</groupId>
<artifactId>GalaxiUtil</artifactId>
<version>20w08a</version>
<version>20w08c</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>

View File

@ -20,7 +20,7 @@
<dependency>
<groupId>net.ME1312.Galaxi</groupId>
<artifactId>GalaxiEngine</artifactId>
<version>20w08a</version>
<version>20w08c</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>

View File

@ -30,14 +30,14 @@
<dependency>
<groupId>net.ME1312.Galaxi</groupId>
<artifactId>GalaxiUtil</artifactId>
<version>20w08a</version>
<version>20w08c</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>net.ME1312.Galaxi</groupId>
<artifactId>GalaxiEngine</artifactId>
<version>20w08a</version>
<version>20w08c</version>
<scope>provided</scope>
</dependency>
<dependency>