@ArenaEventHandler public void matchCancelled(MatchCancelledEvent event) { Match match = event.getMatch(); Matchup matchup = matchups.remove(match); if (matchup == null) return; Duel d = ongoingDuels.remove(matchup); if (d == null) return; Double money = (Double) d.getDuelOptionValue(DuelOption.MONEY); if (money != null) { refundMoney(money, match.getTeams()); } }
@EventHandler public void matchCancelled(MatchCancelledEvent event) { if (!isRunning()) /// Tournament isnt even going on, definitely not our match return; Match am = event.getMatch(); Matchup m = getMatchup(am.getTeams().get(0), round); // System.out.println("victor ===" + victor + " am= " +am + " losers=" + am.getLosers() +" m // = " + m +" am.result="+am.getResult()); if (m == null) { // / This match wasnt in our tournament return; } eventCancelled(); }
@MatchEventHandler public void matchCancelled(MatchCancelledEvent event) { Match am = event.getMatch(); Matchup m = getMatchup(am.getTeams().get(0), round); System.out.println( "victor === am= " + am + " losers=" + am.getLosers() + " m = " + m + " am.result=" + am.getResult()); if (m == null) { // / This match wasnt in our tournament return; } eventCancelled(); }