Fixed text output in Achi GUI for completed

This commit is contained in:
Chiss 2014-08-26 18:06:01 +10:00
parent 3eae26ef80
commit ab29a5fa29
2 changed files with 8 additions and 2 deletions

View File

@ -71,7 +71,7 @@ public class AchievementPage extends ShopPageBase<AchievementManager, Achievemen
{ {
Material material = hasUnlocked ? Material.EMERALD : Material.INK_SACK; Material material = hasUnlocked ? Material.EMERALD : Material.INK_SACK;
String itemName = hasUnlocked ? C.cGreen : C.cRed + achievement.getName(); String itemName = (hasUnlocked ? C.cGreen : C.cRed) + achievement.getName();
if (!singleLevel) if (!singleLevel)
itemName += ChatColor.WHITE + " Level " + data.getLevel() + "/" + achievement.getMaxLevel(); itemName += ChatColor.WHITE + " Level " + data.getLevel() + "/" + achievement.getMaxLevel();
@ -96,6 +96,12 @@ public class AchievementPage extends ShopPageBase<AchievementManager, Achievemen
lore.add(C.cYellow + "Reward: " + C.cGreen + achievement.getGemReward() + " Gems"); lore.add(C.cYellow + "Reward: " + C.cGreen + achievement.getGemReward() + " Gems");
} }
if (hasUnlocked && data.getLevel() == achievement.getMaxLevel())
{
lore.add(" ");
lore.add(C.cAqua + "Complete!");
}
AddItem(currentIndex, new ShopItem(material, (byte) (hasUnlocked ? 0 : 8), itemName, lore.toArray(new String[0]), 1, false, false)); AddItem(currentIndex, new ShopItem(material, (byte) (hasUnlocked ? 0 : 8), itemName, lore.toArray(new String[0]), 1, false, false));
} }