Skip to content

Commit

Permalink
Consider idle and away players in player count
Browse files Browse the repository at this point in the history
  • Loading branch information
mattboy9921 committed May 30, 2024
1 parent 17e3b6e commit 75a916b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/net/mattlabs/skipnight/Vote.java
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ private void doInit() {
* Sets the boss bar each second. */
private void doOperation() {
countDown--;
if (yes + no == playerCount) timer = Timer.INTERRUPT;
if (yes + no + idle + away == playerCount) timer = Timer.INTERRUPT;
if (voteCancel()) timer = Timer.CANCEL;
bar.progress((float) countDown / countDownInit);
if (playerActivity)
Expand All @@ -144,7 +144,7 @@ private void doInterrupt() {
/* The last 10 seconds of the vote. Boss bar alternates white and purple and players receive a message. */
private void doFinal() {
countDown--;
if (yes + no == playerCount) timer = Timer.INTERRUPT;
if (yes + no + idle + away == playerCount) timer = Timer.INTERRUPT;
if (voteCancel()) timer = Timer.CANCEL;
bar.progress((float) countDown / countDownInit);
if (playerActivity)
Expand Down

0 comments on commit 75a916b

Please sign in to comment.