AutoRefPlayer apl = match.getPlayer(player);
if (apl != null && player.getLocation() != null)
apl.setLastLogoutLocation(player.getLocation());
// if this player was damaged recently (during the match), notify
if (match.getCurrentState().inProgress() && apl != null && !apl.isDead() && apl.wasDamagedRecently())
{
String message = apl.getDisplayName() + ChatColor.GRAY + " logged out during combat " +
String.format("with %2.1f hearts remaining", apl.getPlayer().getHealth() / 2.0);
for (Player ref : match.getReferees(true)) ref.sendMessage(message);
}