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

This commit is contained in:
CoderTim 2014-08-28 06:54:36 -04:00
commit cc57ddf4bc
7 changed files with 13 additions and 9 deletions

View File

@ -66,7 +66,7 @@ public class Menu extends ShopPageBase<CosmeticManager, CosmeticShop>
@Override @Override
public void ClickedLeft(Player player) public void ClickedLeft(Player player)
{ {
if (Shop.getBoosterEnabled()) if (Shop.getBoosterEnabled() && Plugin.getInventoryManager().Get(Player).getItemCount("Gem Booster") > 0)
{ {
ActivateGemBoosterEvent boosterEvent = new ActivateGemBoosterEvent(player); ActivateGemBoosterEvent boosterEvent = new ActivateGemBoosterEvent(player);
Bukkit.getServer().getPluginManager().callEvent(boosterEvent); Bukkit.getServer().getPluginManager().callEvent(boosterEvent);

View File

@ -10,7 +10,7 @@ public class HubClient
public String PurchaseString = " Purchase Ultra Rank at mineplex.com to unlock all game benefits!"; public String PurchaseString = " Purchase Ultra Rank at mineplex.com to unlock all game benefits!";
public int PurchaseIndex = 0; public int PurchaseIndex = 0;
public String UltraString = " Thank you for your support!"; public String UltraString = " Thank you for your support!";
public int UltraIndex = 0; public int UltraIndex = 0;

View File

@ -119,7 +119,7 @@ public class PollManager extends MiniClientPlugin<PlayerPollData>
{ {
String[] answers = poll.getAnswers(); String[] answers = poll.getAnswers();
player.sendMessage(C.cGold + C.Bold + "-----------" + C.cYellow + C.Bold + "POLL" + C.cGold + C.Bold + "-----------"); player.sendMessage(C.cGold + C.Bold + "--------------" + C.cYellow + C.Bold + "POLL" + C.cGold + C.Bold + "--------------");
player.sendMessage(poll.getQuestion()); player.sendMessage(poll.getQuestion());
player.sendMessage(""); player.sendMessage("");
for (int i = 1; i <= answers.length; i++) for (int i = 1; i <= answers.length; i++)
@ -151,7 +151,7 @@ public class PollManager extends MiniClientPlugin<PlayerPollData>
} }
player.sendMessage(""); player.sendMessage("");
player.sendMessage("Click an answer to receive " + C.cGreen + poll.getCoinReward() + " Gems"); player.sendMessage("Click an answer to receive " + C.cGreen + poll.getCoinReward() + " Gems");
player.sendMessage(C.cGold + C.Bold + "--------------------------"); player.sendMessage(C.cGold + C.Bold + "--------------------------------");
player.playSound(player.getEyeLocation(), Sound.ORB_PICKUP, 2f, 0f); player.playSound(player.getEyeLocation(), Sound.ORB_PICKUP, 2f, 0f);
} }

View File

@ -102,7 +102,7 @@ public class PollCommand extends CommandBase<PollManager>
UtilPlayer.message(caller, "Reward: " + C.cYellow + poll.getCoinReward()); UtilPlayer.message(caller, "Reward: " + C.cYellow + poll.getCoinReward());
UtilPlayer.message(caller, ""); UtilPlayer.message(caller, "");
DecimalFormat decimalFormat = new DecimalFormat("#.##"); DecimalFormat decimalFormat = new DecimalFormat("#.#");
double aPercent = stats.getAPercent(); double aPercent = stats.getAPercent();
double bPercent = stats.getBPercent(); double bPercent = stats.getBPercent();
double cPercent = stats.getCPercent(); double cPercent = stats.getCPercent();
@ -123,7 +123,7 @@ public class PollCommand extends CommandBase<PollManager>
percent = dPercent; percent = dPercent;
UtilPlayer.message(caller, answer); UtilPlayer.message(caller, answer);
UtilPlayer.message(caller, getProgressBar(percent, 60) + " " + C.cWhite + "(" + C.cYellow + decimalFormat.format(percent) + "%" + C.cWhite + ")"); UtilPlayer.message(caller, getProgressBar(percent, 60) + " " + C.cWhite + "(" + C.cYellow + decimalFormat.format(100d*percent) + "%" + C.cWhite + ")");
} }
} }
UtilPlayer.message(caller, " "); UtilPlayer.message(caller, " ");

View File

@ -1076,7 +1076,6 @@ public abstract class Game implements Listener
Announce(F.elem(player.getName()) + " used a " + F.elem(C.cGreen + "Gem Booster") + " for " + F.elem("+" + (100-(GemBoosters.size()*25)) + "% Gems") + "!"); Announce(F.elem(player.getName()) + " used a " + F.elem(C.cGreen + "Gem Booster") + " for " + F.elem("+" + (100-(GemBoosters.size()*25)) + "% Gems") + "!");
GemBoosters.add(player.getName()); GemBoosters.add(player.getName());
Manager.getInventoryManager().addItemToInventory(player, "Utility", "Gem Booster", -1);
} }
public double GetGemBoostAmount() public double GetGemBoostAmount()

View File

@ -82,7 +82,7 @@ public class GameAchievementManager implements Listener
//Display //Display
for (final Achievement type : log.keySet()) for (final Achievement type : log.keySet())
{ {
UtilPlayer.message(player, "");
AchievementData data = Manager.GetAchievement().get(player, type); AchievementData data = Manager.GetAchievement().get(player, type);
@ -100,6 +100,7 @@ public class GameAchievementManager implements Listener
//Finishing for the first time //Finishing for the first time
if (!Manager.GetTaskManager().hasCompletedTask(player, type.getName())) if (!Manager.GetTaskManager().hasCompletedTask(player, type.getName()))
{ {
UtilPlayer.message(player, "");
UtilPlayer.message(player, nameLevel + " " + F.elem(C.cAqua + C.Bold + "Completed!") + UtilPlayer.message(player, nameLevel + " " + F.elem(C.cAqua + C.Bold + "Completed!") +
" " + F.elem(C.cGreen + C.Bold + "+" + type.getGemReward() + " Gems")); " " + F.elem(C.cGreen + C.Bold + "+" + type.getGemReward() + " Gems"));
@ -122,6 +123,7 @@ public class GameAchievementManager implements Listener
//Multi-Level Achievements //Multi-Level Achievements
else if (log.get(type).LevelUp) else if (log.get(type).LevelUp)
{ {
UtilPlayer.message(player, "");
UtilPlayer.message(player, nameLevel + " " + progress + UtilPlayer.message(player, nameLevel + " " + progress +
" " + F.elem(C.cAqua + C.Bold + "LEVEL UP!")); " " + F.elem(C.cAqua + C.Bold + "LEVEL UP!"));
@ -132,6 +134,7 @@ public class GameAchievementManager implements Listener
//Single Level //Single Level
if (type.getMaxLevel() == 1) if (type.getMaxLevel() == 1)
{ {
UtilPlayer.message(player, "");
UtilPlayer.message(player, nameLevel + " " + progress + UtilPlayer.message(player, nameLevel + " " + progress +
" " + F.elem(ChatColor.YELLOW + "" + (data.getExpNextLevel() - data.getExpRemainder()) + " to Complete")); " " + F.elem(ChatColor.YELLOW + "" + (data.getExpNextLevel() - data.getExpRemainder()) + " to Complete"));
} }
@ -140,12 +143,14 @@ public class GameAchievementManager implements Listener
//Multi Level - Almost Finished //Multi Level - Almost Finished
if (data.getLevel() == type.getMaxLevel() - 1) if (data.getLevel() == type.getMaxLevel() - 1)
{ {
UtilPlayer.message(player, "");
UtilPlayer.message(player, nameLevel + " " + progress + UtilPlayer.message(player, nameLevel + " " + progress +
" " + F.elem(ChatColor.YELLOW + "" + (data.getExpNextLevel() - data.getExpRemainder()) + " to Complete")); " " + F.elem(ChatColor.YELLOW + "" + (data.getExpNextLevel() - data.getExpRemainder()) + " to Complete"));
} }
//Multi Level - Many levels to go //Multi Level - Many levels to go
else else
{ {
UtilPlayer.message(player, "");
UtilPlayer.message(player, nameLevel + " " + progress + UtilPlayer.message(player, nameLevel + " " + progress +
" " + F.elem(ChatColor.YELLOW + "" + (data.getExpNextLevel() - data.getExpRemainder()) + " to Next Level")); " " + F.elem(ChatColor.YELLOW + "" + (data.getExpNextLevel() - data.getExpRemainder()) + " to Next Level"));
} }

View File

@ -27,6 +27,6 @@ public class StatTracker<G extends Game> implements Listener
public void addStat(Player player, String stat, int value, boolean limitTo1, boolean global) public void addStat(Player player, String stat, int value, boolean limitTo1, boolean global)
{ {
if (canAddStats()) if (canAddStats())
addStat(player, stat, value, limitTo1, global); getGame().AddStat(player, stat, value, limitTo1, global);
} }
} }