// if both players are not on a team, quit
if (aapl.getTeam() == null && vapl.getTeam() == null) return;
// if the attacked isn't on a team, or same team (w/ no FF), cancel
if (vapl.getTeam() == null || (aapl.getTeam() == vapl.getTeam() && !match.allowFriendlyFire()))
{ event.setCancelled(true); return; }
}
// only allow damage before a match if it is a direct attack
if (match.getCurrentState().isBeforeMatch() &&