mirror of
https://github.com/Flowsqy/ShopChest.git
synced 2024-11-26 01:05:12 +01:00
Add default items.lang
This commit is contained in:
parent
3509557243
commit
7cec9d9f1f
@ -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
|
||||
|
1
plugin/src/main/resources/lang/items.lang
Normal file
1
plugin/src/main/resources/lang/items.lang
Normal file
@ -0,0 +1 @@
|
||||
# See usage section on github to fill this file.
|
Loading…
Reference in New Issue
Block a user