Don't add player's current poll to the queue
This commit is contained in:
parent
34ffc06166
commit
36d5c2c3af
@ -46,4 +46,14 @@ public class Poll
|
||||
{
|
||||
return _coinReward;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object object)
|
||||
{
|
||||
if (object instanceof Poll)
|
||||
{
|
||||
return ((Poll) object).getId() == getId();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -123,8 +123,10 @@ public class PollManager extends MiniClientPlugin<PlayerPollData>
|
||||
|
||||
for (Poll poll : _polls)
|
||||
{
|
||||
if (!pollData.hasAnswered(poll))
|
||||
pollQueue.add(poll);
|
||||
if (poll.equals(pollData.getCurrentPoll()) || pollData.hasAnswered(poll))
|
||||
continue;
|
||||
|
||||
pollQueue.add(poll);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user