Merge branch 'master' of ssh://184.154.0.242:7999/min/mineplex

This commit is contained in:
Chiss 2014-08-30 20:49:46 +10:00
commit 116c54352b
5 changed files with 19 additions and 10 deletions

View File

@ -88,6 +88,10 @@ public class AchievementMainPage extends ShopPageBase<AchievementManager, Achiev
PlayerStats stats = _statsManager.Get(_target); PlayerStats stats = _statsManager.Get(_target);
for (int i = 0; i < statsToDisplay.length && i < max; i++) for (int i = 0; i < statsToDisplay.length && i < max; i++)
{ {
// Skip showing Wins and Losses for other players
if ((!Player.equals(_target)) && (statsToDisplay[i].equalsIgnoreCase("Wins") || statsToDisplay[i].equalsIgnoreCase("Losses")))
continue;
String statName = statsToDisplay[i]; String statName = statsToDisplay[i];
int statNumber = 0; int statNumber = 0;

View File

@ -162,6 +162,10 @@ public class AchievementPage extends ShopPageBase<AchievementManager, Achievemen
String[] friendlyStatNames = _category.getFriendlyStatNames(); String[] friendlyStatNames = _category.getFriendlyStatNames();
for (int i = 0; i < statsToDisplay.length; i++) for (int i = 0; i < statsToDisplay.length; i++)
{ {
// Skip showing Wins and Losses for other players
if ((!Player.equals(_target)) && (statsToDisplay[i].equalsIgnoreCase("Wins") || statsToDisplay[i].equalsIgnoreCase("Losses")))
continue;
int statNumber = 0; int statNumber = 0;
for (String statToPull : _category.getStatsToPull()) for (String statToPull : _category.getStatsToPull())
statNumber += stats.getStat(statToPull + "." + statsToDisplay[i]); statNumber += stats.getStat(statToPull + "." + statsToDisplay[i]);

View File

@ -99,9 +99,9 @@ public class GadgetPage extends ShopPageBase<CosmeticManager, CosmeticShop>
else else
{ {
if (gadget.GetCost(CurrencyType.Coins) > 0 && DonationManager.Get(Player.getName()).GetBalance(CurrencyType.Coins) >= gadget.GetCost(CurrencyType.Coins)) if (gadget.GetCost(CurrencyType.Coins) > 0 && DonationManager.Get(Player.getName()).GetBalance(CurrencyType.Coins) >= gadget.GetCost(CurrencyType.Coins))
AddButton(slot, new ShopItem(Material.INK_SACK, (byte)8, "Purchase " + gadget.GetName(), itemLore.toArray(new String[itemLore.size()]), 1, false, false), new GadgetButton(gadget, this)); AddButton(slot, new ShopItem(Material.INK_SACK, (byte)8, (gadget.GetCost(CurrencyType.Coins) < 0 ? "" : "Purchase ") + gadget.GetName(), itemLore.toArray(new String[itemLore.size()]), 1, false, false), new GadgetButton(gadget, this));
else else
setItem(slot, new ShopItem(Material.INK_SACK, (byte)8, "Purchase " + gadget.GetName(), itemLore.toArray(new String[itemLore.size()]), 1, true, false)); setItem(slot, new ShopItem(Material.INK_SACK, (byte)8, (gadget.GetCost(CurrencyType.Coins) < 0 ? "" : "Purchase ") + gadget.GetName(), itemLore.toArray(new String[itemLore.size()]), 1, true, false));
} }
} }

View File

@ -3,6 +3,7 @@ package mineplex.core.cosmetic.ui.page;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.craftbukkit.v1_7_R4.inventory.CraftItemStack;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import mineplex.core.account.CoreClientManager; import mineplex.core.account.CoreClientManager;
@ -51,7 +52,7 @@ public class Menu extends ShopPageBase<CosmeticManager, CosmeticShop>
else else
{ {
*/ */
AddItem(13, new ShopItem(Material.CHEST, C.cGold + treasureChestCount + " Treasure Chests (COMING SOON!)" + ChatColor.RESET, 1, false)); AddItem(13, new ShopItem(Material.CHEST, ChatColor.RESET + C.cGold + treasureChestCount + " Treasure Chests (COMING SOON!)" + ChatColor.RESET, 1, false));
//} //}
final GemBooster gemBoosterItem = new GemBooster(Shop.getBoosterEnabled(), Plugin.getInventoryManager().Get(Player).getItemCount("Gem Booster")); final GemBooster gemBoosterItem = new GemBooster(Shop.getBoosterEnabled(), Plugin.getInventoryManager().Get(Player).getItemCount("Gem Booster"));
@ -115,7 +116,7 @@ public class Menu extends ShopPageBase<CosmeticManager, CosmeticShop>
final Gadget gadget = Plugin.getGadgetManager().getActive(Player, GadgetType.Particle); final Gadget gadget = Plugin.getGadgetManager().getActive(Player, GadgetType.Particle);
AddButton(36, AddButton(36,
new ShopItem(gadget.GetDisplayMaterial(), gadget.GetDisplayData(), C.mItem + gadget.GetName(), new String[] {}, 1, false, false), new ShopItem(gadget.GetDisplayMaterial(), gadget.GetDisplayData(), ChatColor.RESET + C.mItem + gadget.GetName(), new String[] {}, 1, false, false),
new SingleButton() new SingleButton()
{ {
@Override @Override
@ -133,7 +134,7 @@ public class Menu extends ShopPageBase<CosmeticManager, CosmeticShop>
final Gadget gadget = Plugin.getGadgetManager().getActive(Player, GadgetType.Item); final Gadget gadget = Plugin.getGadgetManager().getActive(Player, GadgetType.Item);
AddButton(38, AddButton(38,
new ShopItem(gadget.GetDisplayMaterial(), gadget.GetDisplayData(), C.mItem + gadget.GetName(), new String[] {}, 1, false, false), new ShopItem(gadget.GetDisplayMaterial(), gadget.GetDisplayData(), ChatColor.RESET + C.mItem + gadget.GetName(), new String[] {}, 1, false, false),
new SingleButton() new SingleButton()
{ {
@Override @Override
@ -151,7 +152,7 @@ public class Menu extends ShopPageBase<CosmeticManager, CosmeticShop>
final Gadget gadget = Plugin.getGadgetManager().getActive(Player, GadgetType.Morph); final Gadget gadget = Plugin.getGadgetManager().getActive(Player, GadgetType.Morph);
AddButton(40, AddButton(40,
new ShopItem(gadget.GetDisplayMaterial(), gadget.GetDisplayData(), C.mItem + gadget.GetName(), new String[] {}, 1, false, false), new ShopItem(gadget.GetDisplayMaterial(), gadget.GetDisplayData(), ChatColor.RESET + C.mItem + gadget.GetName(), new String[] {}, 1, false, false),
new SingleButton() new SingleButton()
{ {
@Override @Override
@ -169,7 +170,7 @@ public class Menu extends ShopPageBase<CosmeticManager, CosmeticShop>
final Mount<?> mount = Plugin.getMountManager().getActive(Player); final Mount<?> mount = Plugin.getMountManager().getActive(Player);
AddButton(42, AddButton(42,
new ShopItem(mount.GetDisplayMaterial(), mount.GetDisplayData(), C.mItem + mount.GetName(), new String[] {}, 1, false, false), new ShopItem(mount.GetDisplayMaterial(), mount.GetDisplayData(), ChatColor.RESET + C.mItem + mount.GetName(), new String[] {}, 1, false, false),
new SingleButton() new SingleButton()
{ {
@Override @Override
@ -184,7 +185,7 @@ public class Menu extends ShopPageBase<CosmeticManager, CosmeticShop>
if (Plugin.getPetManager().hasActivePet(Player.getName())) if (Plugin.getPetManager().hasActivePet(Player.getName()))
{ {
AddButton(44, new ShopItem(Material.MONSTER_EGG, (byte)Plugin.getPetManager().getActivePet(Player.getName()).getType().getTypeId(), C.mItem + Plugin.getPetManager().getActivePet(Player.getName()).getCustomName(), new String[] {}, 1, false, false), AddButton(44, new ShopItem(Material.MONSTER_EGG, (byte)Plugin.getPetManager().getActivePet(Player.getName()).getType().getTypeId(), ChatColor.RESET + C.mItem + Plugin.getPetManager().getActivePet(Player.getName()).getCustomName(), new String[] {}, 1, false, false),
new SingleButton() new SingleButton()
{ {
@Override @Override

View File

@ -71,9 +71,9 @@ public class MountPage extends ShopPageBase<CosmeticManager, CosmeticShop>
else else
{ {
if (mount.GetCost(CurrencyType.Coins) != -1 && DonationManager.Get(Player.getName()).GetBalance(CurrencyType.Coins) >= mount.GetCost(CurrencyType.Coins)) if (mount.GetCost(CurrencyType.Coins) != -1 && DonationManager.Get(Player.getName()).GetBalance(CurrencyType.Coins) >= mount.GetCost(CurrencyType.Coins))
AddButton(slot, new ShopItem(mount.GetDisplayMaterial(), mount.GetDisplayData(), "Purchase " + mount.GetName(), itemLore.toArray(new String[itemLore.size()]), 1, false, false), new MountButton(mount, this)); AddButton(slot, new ShopItem(mount.GetDisplayMaterial(), mount.GetDisplayData(), (mount.GetCost(CurrencyType.Coins) < 0 ? "" : "Purchase ") + mount.GetName(), itemLore.toArray(new String[itemLore.size()]), 1, false, false), new MountButton(mount, this));
else else
setItem(slot, new ShopItem(mount.GetDisplayMaterial(), mount.GetDisplayData(), "Purchase " + mount.GetName(), itemLore.toArray(new String[itemLore.size()]), 1, true, false)); setItem(slot, new ShopItem(mount.GetDisplayMaterial(), mount.GetDisplayData(), (mount.GetCost(CurrencyType.Coins) < 0 ? "" : "Purchase ") + mount.GetName(), itemLore.toArray(new String[itemLore.size()]), 1, true, false));
} }
AddButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[] { }, 1, false), new SingleButton() AddButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[] { }, 1, false), new SingleButton()