Merge branch 'master' of ssh://184.154.0.242:7999/min/Mineplex
This commit is contained in:
commit
cc57ddf4bc
@ -66,7 +66,7 @@ public class Menu extends ShopPageBase<CosmeticManager, CosmeticShop>
|
||||
@Override
|
||||
public void ClickedLeft(Player player)
|
||||
{
|
||||
if (Shop.getBoosterEnabled())
|
||||
if (Shop.getBoosterEnabled() && Plugin.getInventoryManager().Get(Player).getItemCount("Gem Booster") > 0)
|
||||
{
|
||||
ActivateGemBoosterEvent boosterEvent = new ActivateGemBoosterEvent(player);
|
||||
Bukkit.getServer().getPluginManager().callEvent(boosterEvent);
|
||||
|
@ -10,7 +10,7 @@ public class HubClient
|
||||
|
||||
public String PurchaseString = " Purchase Ultra Rank at mineplex.com to unlock all game benefits!";
|
||||
public int PurchaseIndex = 0;
|
||||
|
||||
|
||||
public String UltraString = " Thank you for your support!";
|
||||
public int UltraIndex = 0;
|
||||
|
||||
|
@ -119,7 +119,7 @@ public class PollManager extends MiniClientPlugin<PlayerPollData>
|
||||
{
|
||||
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("");
|
||||
for (int i = 1; i <= answers.length; i++)
|
||||
@ -151,7 +151,7 @@ public class PollManager extends MiniClientPlugin<PlayerPollData>
|
||||
}
|
||||
player.sendMessage("");
|
||||
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);
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ public class PollCommand extends CommandBase<PollManager>
|
||||
UtilPlayer.message(caller, "Reward: " + C.cYellow + poll.getCoinReward());
|
||||
UtilPlayer.message(caller, "");
|
||||
|
||||
DecimalFormat decimalFormat = new DecimalFormat("#.##");
|
||||
DecimalFormat decimalFormat = new DecimalFormat("#.#");
|
||||
double aPercent = stats.getAPercent();
|
||||
double bPercent = stats.getBPercent();
|
||||
double cPercent = stats.getCPercent();
|
||||
@ -123,7 +123,7 @@ public class PollCommand extends CommandBase<PollManager>
|
||||
percent = dPercent;
|
||||
|
||||
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, " ");
|
||||
|
@ -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") + "!");
|
||||
|
||||
GemBoosters.add(player.getName());
|
||||
Manager.getInventoryManager().addItemToInventory(player, "Utility", "Gem Booster", -1);
|
||||
}
|
||||
|
||||
public double GetGemBoostAmount()
|
||||
|
@ -82,7 +82,7 @@ public class GameAchievementManager implements Listener
|
||||
//Display
|
||||
for (final Achievement type : log.keySet())
|
||||
{
|
||||
UtilPlayer.message(player, "");
|
||||
|
||||
|
||||
AchievementData data = Manager.GetAchievement().get(player, type);
|
||||
|
||||
@ -100,6 +100,7 @@ public class GameAchievementManager implements Listener
|
||||
//Finishing for the first time
|
||||
if (!Manager.GetTaskManager().hasCompletedTask(player, type.getName()))
|
||||
{
|
||||
UtilPlayer.message(player, "");
|
||||
UtilPlayer.message(player, nameLevel + " " + F.elem(C.cAqua + C.Bold + "Completed!") +
|
||||
" " + F.elem(C.cGreen + C.Bold + "+" + type.getGemReward() + " Gems"));
|
||||
|
||||
@ -122,6 +123,7 @@ public class GameAchievementManager implements Listener
|
||||
//Multi-Level Achievements
|
||||
else if (log.get(type).LevelUp)
|
||||
{
|
||||
UtilPlayer.message(player, "");
|
||||
UtilPlayer.message(player, nameLevel + " " + progress +
|
||||
" " + F.elem(C.cAqua + C.Bold + "LEVEL UP!"));
|
||||
|
||||
@ -132,6 +134,7 @@ public class GameAchievementManager implements Listener
|
||||
//Single Level
|
||||
if (type.getMaxLevel() == 1)
|
||||
{
|
||||
UtilPlayer.message(player, "");
|
||||
UtilPlayer.message(player, nameLevel + " " + progress +
|
||||
" " + F.elem(ChatColor.YELLOW + "" + (data.getExpNextLevel() - data.getExpRemainder()) + " to Complete"));
|
||||
}
|
||||
@ -140,12 +143,14 @@ public class GameAchievementManager implements Listener
|
||||
//Multi Level - Almost Finished
|
||||
if (data.getLevel() == type.getMaxLevel() - 1)
|
||||
{
|
||||
UtilPlayer.message(player, "");
|
||||
UtilPlayer.message(player, nameLevel + " " + progress +
|
||||
" " + F.elem(ChatColor.YELLOW + "" + (data.getExpNextLevel() - data.getExpRemainder()) + " to Complete"));
|
||||
}
|
||||
//Multi Level - Many levels to go
|
||||
else
|
||||
{
|
||||
UtilPlayer.message(player, "");
|
||||
UtilPlayer.message(player, nameLevel + " " + progress +
|
||||
" " + F.elem(ChatColor.YELLOW + "" + (data.getExpNextLevel() - data.getExpRemainder()) + " to Next Level"));
|
||||
}
|
||||
|
@ -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)
|
||||
{
|
||||
if (canAddStats())
|
||||
addStat(player, stat, value, limitTo1, global);
|
||||
getGame().AddStat(player, stat, value, limitTo1, global);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user