From 1c484367a136547616b5d21859eb7b88efa823fb Mon Sep 17 00:00:00 2001 From: Shaun Bennett Date: Tue, 11 Aug 2015 04:57:45 -0500 Subject: [PATCH] Add hasPoll --- .../src/mineplex/core/bonuses/BonusManager.java | 2 +- .../Mineplex.Core/src/mineplex/core/poll/PollManager.java | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/bonuses/BonusManager.java b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/BonusManager.java index ecdd769fd..e262083a0 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/bonuses/BonusManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/BonusManager.java @@ -1022,7 +1022,7 @@ public class BonusManager extends MiniClientPlugin implements I { if (Recharge.Instance.use(player, "Carl Inform", 240000, false, false)) { - if(_pollManager.Get(player).shouldPoll() || canVote(player) || canRank(player) || canDaily(player)) + if(_pollManager.hasPoll(player) || canVote(player) || canRank(player) || canDaily(player)) { if(_showCarl.containsKey(player.getName())) UtilPlayer.message(player, C.cDGreen + C.Bold + "Carl the Creeper)" + C.cGreen + " Hey " + player.getName().replace("s", "sss") + "! I have sssome amazing rewardsss for you! Come sssee me!"); diff --git a/Plugins/Mineplex.Core/src/mineplex/core/poll/PollManager.java b/Plugins/Mineplex.Core/src/mineplex/core/poll/PollManager.java index 5fa00cf3d..fa0b5daa0 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/poll/PollManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/poll/PollManager.java @@ -99,6 +99,11 @@ public class PollManager extends MiniDbClientPlugin return null; } + public boolean hasPoll(Player player) + { + return getNextPoll(Get(player), getClientManager().Get(player).GetRank()) != null; + } + public void displayPoll(Player player, Poll poll) { String[] answers = poll.getAnswers();