Add default items.lang

This commit is contained in:
Flowsqy 2023-08-09 12:59:05 +02:00
parent 3509557243
commit 7cec9d9f1f
2 changed files with 9 additions and 2 deletions

View File

@ -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

View File

@ -0,0 +1 @@
# See usage section on github to fill this file.