AutoReferee

AutoReferee

9.1k Downloads

Matches can end early

itsmartin opened this issue ยท 0 comments

commented

This method runs every 60 seconds (Bukkit time) and checks how much match time remains.

The following line rounds this down to the nearest minute:

long minutesRemaining = match.getTimeRemaining() / 60L;

minutesRemaining is then checked, and if it equals 0, the match ends. This can result in a match ending up to 1 minute early. For example, if the method runs when there are 59 seconds to go.