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
|
@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);
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
|
@ -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, " ");
|
||||||
|
@ -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()
|
||||||
|
@ -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"));
|
||||||
}
|
}
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user