*
* @param team winning team, or null for no winner
*/
public void endMatch(AutoRefTeam team)
{
MatchCompleteEvent event = new MatchCompleteEvent(this, team);
AutoReferee.callEvent(event);
if (event.isCancelled()) return;
AutoReferee plugin = AutoReferee.getInstance();
// update winner from the match complete event
team = event.getWinner();
// announce the victory and set the match to completed
if (team != null) this.broadcast(team.getDisplayName() + " Wins!");
else this.broadcast("Match terminated!");