mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-25 12:05:16 +01:00
Do not hide the item from shop
This commit is contained in:
parent
f894a6aa09
commit
ac9bfcc0b0
@ -22,3 +22,4 @@
|
|||||||
- Added option to leave from job in jobs GUI.
|
- Added option to leave from job in jobs GUI.
|
||||||
- Quest objective amount is now optional (default 1)
|
- Quest objective amount is now optional (default 1)
|
||||||
- Fixed issue when used 1.12 and lower versions then some materials not work correctly.
|
- Fixed issue when used 1.12 and lower versions then some materials not work correctly.
|
||||||
|
- Added option to jobs shop to hide icon if a player there are no enough points to buy a item
|
||||||
|
@ -205,11 +205,6 @@ public class ShopManager {
|
|||||||
|
|
||||||
ShopItem item = ls.get(i);
|
ShopItem item = ls.get(i);
|
||||||
|
|
||||||
if (item.isHideIfNoEnoughPoints() && item.getRequiredTotalLevels() != -1 &&
|
|
||||||
Jobs.getPlayerManager().getJobsPlayer(player).getTotalLevels() < item.getRequiredTotalLevels()) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
ArrayList<String> Lore = new ArrayList<>();
|
ArrayList<String> Lore = new ArrayList<>();
|
||||||
|
|
||||||
CMIMaterial mat = CMIMaterial.get(item.getIconMaterial());
|
CMIMaterial mat = CMIMaterial.get(item.getIconMaterial());
|
||||||
@ -224,6 +219,12 @@ public class ShopManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (item.isHideIfNoEnoughPoints() && item.getRequiredTotalLevels() != -1 &&
|
||||||
|
Jobs.getPlayerManager().getJobsPlayer(player).getTotalLevels() < item.getRequiredTotalLevels()) {
|
||||||
|
mat = CMIMaterial.STONE_BUTTON;
|
||||||
|
Lore.add(Jobs.getLanguage().getMessage("command.shop.info.NoPoints"));
|
||||||
|
}
|
||||||
|
|
||||||
if (mat == null)
|
if (mat == null)
|
||||||
mat = CMIMaterial.STONE_BUTTON;
|
mat = CMIMaterial.STONE_BUTTON;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user