Fixes bug where schems are not copied from jar.

Major bug. Caused by multi-schem PR. The resource in the jar was being
looked up wrongly because of a double parent folder, e.g.
'/schem/schem/island.schem' instead of '/schem/island.schem' so no
schems were found in the jar.
This commit is contained in:
tastybento 2018-12-24 20:23:03 -08:00
parent d24d61480b
commit b82f59e948

View File

@ -43,7 +43,7 @@ public class SchemsManager {
// Save any schems that
try (JarFile jar = new JarFile(addon.getFile())) {
plugin.getAddonsManager().listJarFiles(jar, "schems", ".schem").forEach(name -> {
addon.saveResource("schems/" + name, false);
addon.saveResource(name, false);
});
} catch (IOException e) {
plugin.logError("Could not load schem files from addon jar " + e.getMessage());