From b82f59e948d10f6e4b63c23b58015c6904fe2a51 Mon Sep 17 00:00:00 2001 From: tastybento Date: Mon, 24 Dec 2018 20:23:03 -0800 Subject: [PATCH] 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. --- .../java/world/bentobox/bentobox/managers/SchemsManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/world/bentobox/bentobox/managers/SchemsManager.java b/src/main/java/world/bentobox/bentobox/managers/SchemsManager.java index 2171a3b4e..280dad5ae 100644 --- a/src/main/java/world/bentobox/bentobox/managers/SchemsManager.java +++ b/src/main/java/world/bentobox/bentobox/managers/SchemsManager.java @@ -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());