Treasure ready ;o

This commit is contained in:
Mini-Chiss 2015-02-10 12:38:08 +13:00
parent c1f9f94c2a
commit edddff503e
3 changed files with 14 additions and 7 deletions

View File

@ -7,11 +7,11 @@ import mineplex.core.reward.RewardType;
public enum TreasureType
{
OLD(C.cYellow + "Basic Chest", "Basic Chest", RewardType.OldChest, Material.CHEST, TreasureStyle.BASIC),
OLD(C.cYellow + "Old Chest", "Old Chest", RewardType.OldChest, Material.CHEST, TreasureStyle.BASIC),
ANCIENT(C.cGold + "Heroic Chest", "Heroic Chest", RewardType.AncientChest, Material.TRAPPED_CHEST, TreasureStyle.HEROIC),
ANCIENT(C.cGold + "Ancient Chest", "Ancient Chest", RewardType.AncientChest, Material.TRAPPED_CHEST, TreasureStyle.HEROIC),
MYTHICAL(C.cRed + "Legendary Chest", "Legendary Chest", RewardType.MythicalChest, Material.ENDER_CHEST, TreasureStyle.LEGENDARY);
MYTHICAL(C.cRed + "Mythical Chest", "Mythical Chest", RewardType.MythicalChest, Material.ENDER_CHEST, TreasureStyle.LEGENDARY);
private final String _name;
private final RewardType _rewardType;

View File

@ -32,7 +32,6 @@ public class BuyBasicChestButton implements IButton
@Override
public void onClick(final Player player, ClickType clickType)
{
//need to do this :o
_page.getShop().OpenPageForPlayer(player, new ConfirmationPage<TreasureManager, TreasureShop>(
_page.getPlugin(), _page.getShop(), _page.getClientManager(), _page.getDonationManager(), new Runnable()
{

View File

@ -50,7 +50,7 @@ public class TreasurePage extends ShopPageBase<TreasureManager, TreasureShop>
basicLore.add(F.value("Old Chests Owned", "" + basicCount));
basicLore.add(" ");
if (basicCount > 0)
basicLore.add(ChatColor.RESET + "Click to Open!");
basicLore.add(ChatColor.RESET + C.cGreen + "Click to Open!");
else
{
basicLore.add(ChatColor.RESET + "Cost: " + C.cYellow + "1000 Coins");
@ -63,14 +63,22 @@ public class TreasurePage extends ShopPageBase<TreasureManager, TreasureShop>
heroicLore.add(F.value("Ancient Chests Owned", "" + heroicCount));
heroicLore.add(" ");
if (heroicCount > 0)
heroicLore.add(ChatColor.RESET + "Click to Open!");
heroicLore.add(ChatColor.RESET + C.cGreen + "Click to Open!");
else
{
basicLore.add(ChatColor.RESET + "Purchase at: " + C.cYellow + "www.mineplex.com/shop");
}
List<String> legendaryLore = new ArrayList<String>();
legendaryLore.add(" ");
legendaryLore.add(F.value("Mythical Chests Owned", "" + legendaryCount));
legendaryLore.add(" ");
if (legendaryCount > 0)
legendaryLore.add(ChatColor.RESET + "Click to Open!");
legendaryLore.add(ChatColor.RESET + C.cGreen + "Click to Open!");
else
{
basicLore.add(ChatColor.RESET + "Purchase at: " + C.cYellow + "www.mineplex.com/shop");
}
ShopItem basic = new ShopItem(Material.CHEST, C.cGreen + C.Bold + "Old Chest", basicLore.toArray(new String[0]), 0, false, false);
ShopItem heroic = new ShopItem(Material.TRAPPED_CHEST, C.cGold + C.Bold + "Ancient Chest", heroicLore.toArray(new String[0]), 0, false, false);