{
AutoRefTeam team = match.getPlayerTeam(p);
if (team != null)
{
AutoRefTeam newteam = newmatch.getTeam(team.getDefaultName());
newteam.join(p, Reason.AUTOMATIC, true);
}
// teleport the player to location in new map
Location loc = p.getLocation();
loc.setWorld(newmatch.getWorld());