// if they have left their region, mark their exit location
if (!team.canEnter(event.getTo(), 0.3) && !player.isSleeping())
{
// player is sneaking off the edge and not in freefall
if (player.isSneaking() && team.canEnter(event.getTo()) && fallspeed < FREEFALL_THRESHOLD);
// if there is no exit position, set the exit position
else if (exit == null) apl.setExitLocation(player.getLocation());
// if there is an exit position and they aren't falling, kill them