mirror of
https://github.com/Flowsqy/ShopChest.git
synced 2024-12-01 01:53:22 +01:00
Add default items.lang
This commit is contained in:
parent
3509557243
commit
7cec9d9f1f
@ -64,9 +64,10 @@ public class LanguageLoader {
|
|||||||
@NotNull
|
@NotNull
|
||||||
private ItemNameManager loadItemNameManager() {
|
private ItemNameManager loadItemNameManager() {
|
||||||
final String itemSavePath = getSavePath(getLocalizedFileName(ITEMS_FILENAME, locale));
|
final String itemSavePath = getSavePath(getLocalizedFileName(ITEMS_FILENAME, locale));
|
||||||
|
final String itemsResourcePath = getResourcePath(getFullFileName(ITEMS_FILENAME));
|
||||||
final File itemsFile;
|
final File itemsFile;
|
||||||
try {
|
try {
|
||||||
itemsFile = fileLoader.loadFile(itemSavePath, shopChestPlugin);
|
itemsFile = fileLoader.loadFile(itemSavePath, shopChestPlugin, itemsResourcePath);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
@ -78,9 +79,14 @@ public class LanguageLoader {
|
|||||||
return new LocalizedItemNameManager(storedItems);
|
return new LocalizedItemNameManager(storedItems);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
private String getFullFileName(@NotNull String fileName) {
|
||||||
|
return fileName + ".lang";
|
||||||
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private String getLocalizedFileName(@NotNull String baseName, @NotNull String locale) {
|
private String getLocalizedFileName(@NotNull String baseName, @NotNull String locale) {
|
||||||
return baseName + "-" + locale + ".lang";
|
return getFullFileName(baseName + "-" + locale);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@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