Merge branch 'master' of ssh://184.154.0.242:7999/min/mineplex
This commit is contained in:
commit
116c54352b
@ -88,6 +88,10 @@ public class AchievementMainPage extends ShopPageBase<AchievementManager, Achiev
|
||||
PlayerStats stats = _statsManager.Get(_target);
|
||||
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];
|
||||
|
||||
int statNumber = 0;
|
||||
|
@ -162,6 +162,10 @@ public class AchievementPage extends ShopPageBase<AchievementManager, Achievemen
|
||||
String[] friendlyStatNames = _category.getFriendlyStatNames();
|
||||
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;
|
||||
for (String statToPull : _category.getStatsToPull())
|
||||
statNumber += stats.getStat(statToPull + "." + statsToDisplay[i]);
|
||||
|
@ -99,9 +99,9 @@ public class GadgetPage extends ShopPageBase<CosmeticManager, CosmeticShop>
|
||||
else
|
||||
{
|
||||
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
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,7 @@ package mineplex.core.cosmetic.ui.page;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.craftbukkit.v1_7_R4.inventory.CraftItemStack;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import mineplex.core.account.CoreClientManager;
|
||||
@ -51,7 +52,7 @@ public class Menu extends ShopPageBase<CosmeticManager, CosmeticShop>
|
||||
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"));
|
||||
@ -115,7 +116,7 @@ public class Menu extends ShopPageBase<CosmeticManager, CosmeticShop>
|
||||
final Gadget gadget = Plugin.getGadgetManager().getActive(Player, GadgetType.Particle);
|
||||
|
||||
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()
|
||||
{
|
||||
@Override
|
||||
@ -133,7 +134,7 @@ public class Menu extends ShopPageBase<CosmeticManager, CosmeticShop>
|
||||
final Gadget gadget = Plugin.getGadgetManager().getActive(Player, GadgetType.Item);
|
||||
|
||||
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()
|
||||
{
|
||||
@Override
|
||||
@ -151,7 +152,7 @@ public class Menu extends ShopPageBase<CosmeticManager, CosmeticShop>
|
||||
final Gadget gadget = Plugin.getGadgetManager().getActive(Player, GadgetType.Morph);
|
||||
|
||||
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()
|
||||
{
|
||||
@Override
|
||||
@ -169,7 +170,7 @@ public class Menu extends ShopPageBase<CosmeticManager, CosmeticShop>
|
||||
final Mount<?> mount = Plugin.getMountManager().getActive(Player);
|
||||
|
||||
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()
|
||||
{
|
||||
@Override
|
||||
@ -184,7 +185,7 @@ public class Menu extends ShopPageBase<CosmeticManager, CosmeticShop>
|
||||
|
||||
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()
|
||||
{
|
||||
@Override
|
||||
|
@ -71,9 +71,9 @@ public class MountPage extends ShopPageBase<CosmeticManager, CosmeticShop>
|
||||
else
|
||||
{
|
||||
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
|
||||
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()
|
||||
|
Loading…
Reference in New Issue
Block a user