Add hasPoll

This commit is contained in:
Shaun Bennett 2015-08-11 04:57:45 -05:00
parent 3eb7e91fbb
commit 1c484367a1
2 changed files with 6 additions and 1 deletions

View File

@ -1022,7 +1022,7 @@ public class BonusManager extends MiniClientPlugin<BonusClientData> implements I
{ {
if (Recharge.Instance.use(player, "Carl Inform", 240000, false, false)) 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())) 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!"); 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!");

View File

@ -99,6 +99,11 @@ public class PollManager extends MiniDbClientPlugin<PlayerPollData>
return null; return null;
} }
public boolean hasPoll(Player player)
{
return getNextPoll(Get(player), getClientManager().Get(player).GetRank()) != null;
}
public void displayPoll(Player player, Poll poll) public void displayPoll(Player player, Poll poll)
{ {
String[] answers = poll.getAnswers(); String[] answers = poll.getAnswers();