Skip to content

Commit

Permalink
dummy. etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
7sat committed Feb 12, 2023
1 parent cd691da commit 9bd9901
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
12 changes: 9 additions & 3 deletions src/main/java/me/sat7/dynamicshop/guis/ItemPalette.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public Inventory getGui(Player player, String shopName, int targetSlot, int page

// Add all Button
if(!paletteList.isEmpty())
CreateButton(ADD_ALL, Material.YELLOW_STAINED_GLASS_PANE, t(player, "PALETTE.ADD_ALL"), "");
CreateButton(ADD_ALL, Material.YELLOW_STAINED_GLASS_PANE, t(player, "PALETTE.ADD_ALL"), t(player, "PALETTE.ADD_ALL_LORE_LOCKED"));

// Search Button
String filterString = search.isEmpty() ? "" : t(player, "PALETTE.FILTER_APPLIED") + search;
Expand All @@ -86,7 +86,7 @@ public void OnClickUpperInventory(InventoryClickEvent e)

if (e.getSlot() == CLOSE) CloseUI();
else if (e.getSlot() == PAGE) MovePage(e.isLeftClick(), e.isRightClick());
else if (e.getSlot() == ADD_ALL) AddAll();
else if (e.getSlot() == ADD_ALL && e.isLeftClick()) AddAll(e.isShiftClick());
else if (e.getSlot() == SEARCH) OnClickSearch(e.isLeftClick(), e.isRightClick());
else if (e.getSlot() <= 45) OnClickItem(e.isLeftClick(), e.isRightClick(), e.isShiftClick(), e.getCurrentItem());
}
Expand Down Expand Up @@ -288,8 +288,14 @@ private void MovePage(boolean isLeft, boolean isRight)
DynaShopAPI.openItemPalette(player, shopName, shopSlotIndex, targetPage, this.search);
}

private void AddAll()
private void AddAll(boolean applyRecommend)
{
if (applyRecommend)
{
DynamicShop.PaidOnlyMsg(player);
return;
}

if(paletteList.isEmpty())
return;

Expand Down
4 changes: 3 additions & 1 deletion src/main/java/me/sat7/dynamicshop/utilities/LangUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ public static void setupLangFile(String lang)
ccLang.get().addDefault("PALETTE.LORE_PREMIUM", "§e좌클릭: 추가\n§e씨프트 좌클릭: 설정 후 추가\n§e우클릭: 장식으로 추가\n§e씨프트 우클릭: '{item}' 를 검색");
ccLang.get().addDefault("PALETTE.SEARCH", "§f찾기");
ccLang.get().addDefault("PALETTE.ADD_ALL", "§f모두 추가");
ccLang.get().addDefault("PALETTE.ADD_ALL_LORE_LOCKED", "§e좌클릭: 모두 추가\n§7씨프트 좌클릭: 모두 추가하고 권장 값 적용");
ccLang.get().addDefault("PALETTE.PAGE_TITLE", "§f{curPage}/{maxPage} 페이지");
ccLang.get().addDefault("PALETTE.PAGE_LORE", "§f§n좌클릭: 이전 페이지\n§f§n우클릭: 다음 페이지");
ccLang.get().addDefault("PALETTE.FILTER_APPLIED", "§f필터 적용됨 : ");
Expand Down Expand Up @@ -595,6 +596,7 @@ public static void setupLangFile(String lang)
ccLang.get().addDefault("PALETTE.LORE_PREMIUM", "§eLMB: Add\n§eShift LMB: Add after setting\n§eRMB: Add as decoration\n§eShift RMB: Search '{item}'");
ccLang.get().addDefault("PALETTE.SEARCH", "§fSearch");
ccLang.get().addDefault("PALETTE.ADD_ALL", "§fAdd all");
ccLang.get().addDefault("PALETTE.ADD_ALL_LORE_LOCKED", "§eLMB: Add all\n§7Shift LMB: Add all and apply recommended values");
ccLang.get().addDefault("PALETTE.PAGE_TITLE", "§f{curPage}/{maxPage} page");
ccLang.get().addDefault("PALETTE.PAGE_LORE", "§f§nLMB: Prev\n§f§nRMB: Next");
ccLang.get().addDefault("PALETTE.FILTER_APPLIED", "§fFilter Applied : ");
Expand Down Expand Up @@ -735,7 +737,7 @@ public static void setupLangFile(String lang)
ccLang.get().addDefault("RMB", "RMB");
ccLang.get().addDefault("CLOSE", "§fClose");
ccLang.get().addDefault("CLOSE_LORE", "§f§nClick: Close");
ccLang.get().addDefault("PAID_VERSION.DESC", "§fAvailable in paid version ");
ccLang.get().addDefault("PAID_VERSION.DESC", "§fAvailable in paid version. ");
ccLang.get().addDefault("PAID_VERSION.GET_PREMIUM", "Get Premium");

ccLang.get().options().copyDefaults(true);
Expand Down

0 comments on commit 9bd9901

Please sign in to comment.