rmct / AutoReferee

Bukkit plugin for automatically refereeing competitive Minecraft matches.
http://rmct.github.com/AutoReferee
GNU General Public License v3.0
35 stars 19 forks source link

Matches can end early #199

Closed itsmartin closed 8 years ago

itsmartin commented 9 years ago

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.