private static Location newLocation(Player player, Location loc, BorderData border) {
    if (Config.Debug()) {
      Config.LogWarn(
          "Border crossing in \"" + loc.getWorld().getName() + "\". Border " + border.toString());
      Config.LogWarn(
          "Player position X: "
              + Config.coord.format(loc.getX())
              + " Y: "
              + Config.coord.format(loc.getY())
              + " Z: "
              + Config.coord.format(loc.getZ()));
    }

    Location newLoc = border.correctedPosition(loc, Config.ShapeRound());

    // it's remotely possible (such as in the Nether) a suitable location isn't available, in which
    // case...
    if (newLoc == null) {
      if (Config.Debug()) Config.LogWarn("Target new location unviable, using spawn.");
      newLoc = player.getWorld().getSpawnLocation();
    }

    if (Config.Debug())
      Config.LogWarn(
          "New position in world \""
              + newLoc.getWorld().getName()
              + "\" at X: "
              + Config.coord.format(newLoc.getX())
              + " Y: "
              + Config.coord.format(newLoc.getY())
              + " Z: "
              + Config.coord.format(newLoc.getZ()));

    player.sendMessage(ChatColor.RED + Config.Message());

    return newLoc;
  }