diff --git a/plugin/src/main/java/de/epiceric/shopchest/language/LanguageLoader.java b/plugin/src/main/java/de/epiceric/shopchest/language/LanguageLoader.java index cb801f6..3642792 100644 --- a/plugin/src/main/java/de/epiceric/shopchest/language/LanguageLoader.java +++ b/plugin/src/main/java/de/epiceric/shopchest/language/LanguageLoader.java @@ -64,9 +64,10 @@ public class LanguageLoader { @NotNull private ItemNameManager loadItemNameManager() { final String itemSavePath = getSavePath(getLocalizedFileName(ITEMS_FILENAME, locale)); + final String itemsResourcePath = getResourcePath(getFullFileName(ITEMS_FILENAME)); final File itemsFile; try { - itemsFile = fileLoader.loadFile(itemSavePath, shopChestPlugin); + itemsFile = fileLoader.loadFile(itemSavePath, shopChestPlugin, itemsResourcePath); } catch (IOException e) { throw new RuntimeException(e); } @@ -78,9 +79,14 @@ public class LanguageLoader { return new LocalizedItemNameManager(storedItems); } + @NotNull + private String getFullFileName(@NotNull String fileName) { + return fileName + ".lang"; + } + @NotNull private String getLocalizedFileName(@NotNull String baseName, @NotNull String locale) { - return baseName + "-" + locale + ".lang"; + return getFullFileName(baseName + "-" + locale); } @NotNull diff --git a/plugin/src/main/resources/lang/items.lang b/plugin/src/main/resources/lang/items.lang new file mode 100644 index 0000000..16a67fc --- /dev/null +++ b/plugin/src/main/resources/lang/items.lang @@ -0,0 +1 @@ +# See usage section on github to fill this file. \ No newline at end of file