Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a few multi-language support to the guide book #4208

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ private void displaySlimefunItem(ChestMenu menu, ItemGroup itemGroup, Player p,
menu.addItem(index, new CustomItemStack(ChestMenuUtils.getNoPermissionItem(), sfitem.getItemName(), message.toArray(new String[0])));
menu.addMenuClickHandler(index, ChestMenuUtils.getEmptyClickHandler());
} else if (isSurvivalMode() && research != null && !profile.hasUnlocked(research)) {
menu.addItem(index, new CustomItemStack(ChestMenuUtils.getNotResearchedItem(), ChatColor.WHITE + ItemUtils.getItemName(sfitem.getItem()), "&4&l" + Slimefun.getLocalization().getMessage(p, "guide.locked"), "", "&a> Click to unlock", "", "&7Cost: &b" + research.getCost() + " Level(s)"));
menu.addItem(index, new CustomItemStack(ChestMenuUtils.getNotResearchedItem(), ChatColor.WHITE + ItemUtils.getItemName(sfitem.getItem()), "&4&l" + Slimefun.getLocalization().getMessage(p, "guide.locked"), "", "&a> " + Slimefun.getLocalization().getMessage(p, "guide.click-to-unlock"), "", Slimefun.getLocalization().getMessage(p, "guide.cost").replace("%cost%", String.valueOf(research.getCost()))));
menu.addMenuClickHandler(index, (pl, slot, item, action) -> {
research.unlockFromGuide(this, p, profile, sfitem, itemGroup, page);
return false;
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/languages/en/messages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ placeholderapi:

guide:
locked: 'LOCKED'
click-to-unlock: 'Click to unlock'
cost: '&7Cost: &b%cost% Level(s)'
work-in-progress: 'This feature is not fully finished yet!'

locked-itemgroup:
Expand Down
Loading