Program: 34039
Project: 34039
Buggy source:
/** 
 * Prevents teleporting when falling based on setting and teleporting to locked islands
 * @param e
 */
@EventHandler(priority=EventPriority.HIGH,ignoreCancelled=false) public void onPlayerTeleport(final PlayerTeleportEvent e){
  if (debug) {
    plugin.getLogger().info(e.getEventName());
  }
  if (e.getTo() == null || e.getFrom() == null) {
    return;
  }
  if (!IslandGuard.inWorld(e.getTo()) && !IslandGuard.inWorld(e.getFrom())) {
    return;
  }
  if (plugin.getGrid() == null) {
    return;
  }
  if (!Settings.allowTeleportWhenFalling && e.getPlayer().getGameMode().equals(GameMode.SURVIVAL) && !e.getPlayer().isOp()) {
    if (isFalling(e.getPlayer().getUniqueId())) {
      e.getPlayer().sendMessage(plugin.myLocale(e.getPlayer().getUniqueId()).islandcannotTeleport);
      e.setCancelled(true);
      if (e.getPlayer().getLocation().getBlockY() < 0) {
        e.getPlayer().setHealth(0D);
        unsetFalling(e.getPlayer().getUniqueId());
      }
      return;
    }
  }
  Island islandTo=plugin.getGrid().getProtectedIslandAt(e.getTo());
  if (e.getCause() != null && e.getCause().equals(TeleportCause.ENDER_PEARL)) {
    if (islandTo == null) {
      if (Settings.allowEnderPearls) {
        return;
      }
    }
 else {
      if (islandTo.isSpawn()) {
        if (Settings.allowEnderPearls) {
          return;
        }
      }
 else {
        if (islandTo.getIgsFlag(Flags.allowEnderPearls)) {
          return;
        }
      }
    }
    e.getPlayer().sendMessage(ChatColor.RED + plugin.myLocale(e.getPlayer().getUniqueId()).islandProtected);
    e.setCancelled(true);
    return;
  }
  Island islandFrom=plugin.getGrid().getProtectedIslandAt(e.getFrom());
  if (islandTo != null && islandTo.getOwner() != null) {
    if (islandTo != islandFrom) {
      if (islandTo.isLocked() || plugin.getPlayers().isBanned(islandTo.getOwner(),e.getPlayer().getUniqueId())) {
        e.getPlayer().sendMessage(ChatColor.RED + plugin.myLocale(e.getPlayer().getUniqueId()).lockIslandLocked);
        if (!plugin.getGrid().locationIsOnIsland(e.getPlayer(),e.getTo()) && !e.getPlayer().isOp() && !VaultHelper.checkPerm(e.getPlayer(),Settings.PERMPREFIX + "String_Node_Str")&& !VaultHelper.checkPerm(e.getPlayer(),Settings.PERMPREFIX + "String_Node_Str")) {
          e.setCancelled(true);
          return;
        }
      }
      e.getPlayer().sendMessage(plugin.myLocale(e.getPlayer().getUniqueId()).lockNowEntering.replace("String_Node_Str",plugin.getPlayers().getName(islandTo.getOwner())));
    }
  }
}

Fixed version (ground truth):
/** 
 * Prevents teleporting when falling based on setting and teleporting to locked islands
 * @param e
 */
@EventHandler(priority=EventPriority.HIGH,ignoreCancelled=false) public void onPlayerTeleport(final PlayerTeleportEvent e){
  if (debug) {
    plugin.getLogger().info(e.getEventName());
  }
  if (e.getTo() == null || e.getFrom() == null) {
    return;
  }
  if (!IslandGuard.inWorld(e.getTo()) && !IslandGuard.inWorld(e.getFrom())) {
    return;
  }
  if (plugin.getGrid() == null) {
    return;
  }
  if (!Settings.allowTeleportWhenFalling && e.getPlayer().getGameMode().equals(GameMode.SURVIVAL) && !e.getPlayer().isOp()) {
    if (isFalling(e.getPlayer().getUniqueId())) {
      e.getPlayer().sendMessage(plugin.myLocale(e.getPlayer().getUniqueId()).islandcannotTeleport);
      e.setCancelled(true);
      if (e.getPlayer().getLocation().getBlockY() < 0) {
        e.getPlayer().setHealth(0D);
        unsetFalling(e.getPlayer().getUniqueId());
      }
      return;
    }
  }
  Island islandTo=plugin.getGrid().getProtectedIslandAt(e.getTo());
  if (e.getCause() != null && e.getCause().equals(TeleportCause.ENDER_PEARL)) {
    if (islandTo == null) {
      if (Settings.allowEnderPearls) {
        return;
      }
    }
 else {
      if (islandTo.isSpawn()) {
        if (Settings.allowEnderPearls) {
          return;
        }
      }
 else {
        if (islandTo.getIgsFlag(Flags.allowEnderPearls) || islandTo.getMembers().contains(e.getPlayer().getUniqueId())) {
          return;
        }
      }
    }
    e.getPlayer().sendMessage(ChatColor.RED + plugin.myLocale(e.getPlayer().getUniqueId()).islandProtected);
    e.setCancelled(true);
    return;
  }
  Island islandFrom=plugin.getGrid().getProtectedIslandAt(e.getFrom());
  if (islandTo != null && islandTo.getOwner() != null) {
    if (islandTo != islandFrom) {
      if (islandTo.isLocked() || plugin.getPlayers().isBanned(islandTo.getOwner(),e.getPlayer().getUniqueId())) {
        e.getPlayer().sendMessage(ChatColor.RED + plugin.myLocale(e.getPlayer().getUniqueId()).lockIslandLocked);
        if (!plugin.getGrid().locationIsOnIsland(e.getPlayer(),e.getTo()) && !e.getPlayer().isOp() && !VaultHelper.checkPerm(e.getPlayer(),Settings.PERMPREFIX + "String_Node_Str")&& !VaultHelper.checkPerm(e.getPlayer(),Settings.PERMPREFIX + "String_Node_Str")) {
          e.setCancelled(true);
          return;
        }
      }
      e.getPlayer().sendMessage(plugin.myLocale(e.getPlayer().getUniqueId()).lockNowEntering.replace("String_Node_Str",plugin.getPlayers().getName(islandTo.getOwner())));
    }
  }
}