Program: 33857
Project: 33857
Buggy source:
@EventHandler(priority=EventPriority.LOWEST,ignoreCancelled=true) public void onAnimalSpawn(final CreatureSpawnEvent e){
  if (DEBUG2) {
    plugin.getLogger().info("String_Node_Str" + e.getEventName());
    plugin.getLogger().info(e.getSpawnReason().toString());
    plugin.getLogger().info(e.getEntityType().toString());
  }
  if (!(e.getEntity() instanceof Animals) && !e.getEntityType().equals(EntityType.SQUID)) {
    if (DEBUG2)     plugin.getLogger().info("String_Node_Str");
    return;
  }
  if (Settings.breedingLimit <= 0) {
    if (DEBUG2)     plugin.getLogger().info("String_Node_Str");
    return;
  }
  if (e.getSpawnReason() != SpawnReason.SPAWNER && e.getSpawnReason() != SpawnReason.BREEDING && e.getSpawnReason() != SpawnReason.EGG && e.getSpawnReason() != SpawnReason.DISPENSE_EGG && e.getSpawnReason() != SpawnReason.SPAWNER_EGG && !e.getSpawnReason().name().contains("String_Node_Str")) {
    if (DEBUG2)     plugin.getLogger().info("String_Node_Str");
    return;
  }
  LivingEntity animal=e.getEntity();
  if (!animal.getWorld().equals(ASkyBlock.getIslandWorld())) {
    if (!(Settings.createNether && Settings.newNether && ASkyBlock.getNetherWorld() != null)) {
      return;
    }
  }
  if (DEBUG2)   plugin.getLogger().info("String_Node_Str");
  Island island=plugin.getGrid().getProtectedIslandAt(animal.getLocation());
  if (island == null) {
    if (DEBUG2)     plugin.getLogger().info("String_Node_Str");
    return;
  }
  List<Player> culprits=new ArrayList<Player>();
  boolean overLimit=false;
  int animals=0;
  for (int x=island.getMinProtectedX() / 16; x <= (island.getMinProtectedX() + island.getProtectionSize() - 1) / 16; x++) {
    for (int z=island.getMinProtectedZ() / 16; z <= (island.getMinProtectedZ() + island.getProtectionSize() - 1) / 16; z++) {
      for (      Entity entity : ASkyBlock.getIslandWorld().getChunkAt(x,z).getEntities()) {
        if (entity instanceof Animals || entity.getType().equals(EntityType.SQUID)) {
          if (DEBUG2)           plugin.getLogger().info("String_Node_Str" + animals);
          animals++;
          if (animals >= Settings.breedingLimit) {
            overLimit=true;
            animal.remove();
            if (DEBUG2)             plugin.getLogger().info("String_Node_Str" + Settings.breedingLimit);
            e.setCancelled(true);
          }
        }
 else         if (entity instanceof Player && e.getSpawnReason() != SpawnReason.SPAWNER && e.getSpawnReason() != SpawnReason.DISPENSE_EGG) {
          ItemStack itemInHand=((Player)entity).getItemInHand();
          if (itemInHand != null) {
            Material type=itemInHand.getType();
            if (type == Material.EGG || type == Material.MONSTER_EGG || type == Material.WHEAT || type == Material.CARROT_ITEM || type == Material.SEEDS) {
              if (DEBUG2)               plugin.getLogger().info("String_Node_Str");
              culprits.add(((Player)entity));
            }
          }
        }
      }
    }
  }
  if (DEBUG2)   plugin.getLogger().info("String_Node_Str");
  if (Settings.createNether && Settings.newNether && ASkyBlock.getNetherWorld() != null) {
    for (int x=island.getMinProtectedX() / 16; x <= (island.getMinProtectedX() + island.getProtectionSize() - 1) / 16; x++) {
      for (int z=island.getMinProtectedZ() / 16; z <= (island.getMinProtectedZ() + island.getProtectionSize() - 1) / 16; z++) {
        for (        Entity entity : ASkyBlock.getNetherWorld().getChunkAt(x,z).getEntities()) {
          if (entity instanceof Animals || entity.getType().equals(EntityType.SQUID)) {
            if (DEBUG2)             plugin.getLogger().info("String_Node_Str" + animals);
            animals++;
            if (animals >= Settings.breedingLimit) {
              if (DEBUG2)               plugin.getLogger().info("String_Node_Str" + Settings.breedingLimit);
              overLimit=true;
              animal.remove();
              e.setCancelled(true);
            }
          }
 else           if (entity instanceof Player && e.getSpawnReason() != SpawnReason.SPAWNER && e.getSpawnReason() != SpawnReason.DISPENSE_EGG) {
            ItemStack itemInHand=((Player)entity).getItemInHand();
            if (itemInHand != null) {
              Material type=itemInHand.getType();
              if (type == Material.EGG || type == Material.MONSTER_EGG || type == Material.WHEAT || type == Material.CARROT_ITEM || type == Material.SEEDS) {
                culprits.add(((Player)entity));
              }
            }
          }
        }
      }
    }
  }
  if (overLimit) {
    if (e.getSpawnReason() != SpawnReason.SPAWNER) {
      plugin.getLogger().warning("String_Node_Str" + island.getCenter().getBlockX() + "String_Node_Str"+ island.getCenter().getBlockZ()+ "String_Node_Str"+ Settings.breedingLimit);
      for (      Player player : culprits) {
        Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).moblimitsError.replace("String_Node_Str",String.valueOf(Settings.breedingLimit)));
        plugin.getLogger().warning(player.getName() + "String_Node_Str" + Util.prettifyText(player.getItemInHand().getType().toString()));
      }
    }
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.LOWEST,ignoreCancelled=true) public void onAnimalSpawn(final CreatureSpawnEvent e){
  if (DEBUG2) {
    plugin.getLogger().info("String_Node_Str" + e.getEventName());
    plugin.getLogger().info(e.getSpawnReason().toString());
    plugin.getLogger().info(e.getEntityType().toString());
  }
  if (!(e.getEntity() instanceof Animals) && !e.getEntityType().equals(EntityType.SQUID)) {
    if (DEBUG2)     plugin.getLogger().info("String_Node_Str");
    return;
  }
  if (Settings.breedingLimit <= 0) {
    if (DEBUG2)     plugin.getLogger().info("String_Node_Str");
    return;
  }
  if (e.getSpawnReason() != SpawnReason.SPAWNER && e.getSpawnReason() != SpawnReason.BREEDING && e.getSpawnReason() != SpawnReason.EGG && e.getSpawnReason() != SpawnReason.DISPENSE_EGG && e.getSpawnReason() != SpawnReason.SPAWNER_EGG && !e.getSpawnReason().name().contains("String_Node_Str")) {
    if (DEBUG2)     plugin.getLogger().info("String_Node_Str");
    return;
  }
  LivingEntity animal=e.getEntity();
  if (!animal.getWorld().equals(ASkyBlock.getIslandWorld())) {
    if (!(Settings.createNether && Settings.newNether && ASkyBlock.getNetherWorld() != null)) {
      return;
    }
  }
  if (DEBUG2)   plugin.getLogger().info("String_Node_Str");
  Island island=plugin.getGrid().getProtectedIslandAt(animal.getLocation());
  if (island == null) {
    if (DEBUG2)     plugin.getLogger().info("String_Node_Str");
    return;
  }
  List<Player> culprits=new ArrayList<Player>();
  boolean overLimit=false;
  int animals=0;
  for (int x=island.getMinProtectedX() / 16; x <= (island.getMinProtectedX() + island.getProtectionSize() - 1) / 16; x++) {
    for (int z=island.getMinProtectedZ() / 16; z <= (island.getMinProtectedZ() + island.getProtectionSize() - 1) / 16; z++) {
      for (      Entity entity : ASkyBlock.getIslandWorld().getChunkAt(x,z).getEntities()) {
        if (entity instanceof Animals || entity.getType().equals(EntityType.SQUID)) {
          if (DEBUG2)           plugin.getLogger().info("String_Node_Str" + animals);
          animals++;
          if (animals >= Settings.breedingLimit) {
            overLimit=true;
            animal.remove();
            if (DEBUG2)             plugin.getLogger().info("String_Node_Str" + Settings.breedingLimit);
            e.setCancelled(true);
          }
        }
 else         if (entity instanceof Player && e.getSpawnReason() != SpawnReason.SPAWNER && e.getSpawnReason() != SpawnReason.DISPENSE_EGG) {
          for (          ItemStack itemInHand : Util.getPlayerInHandItems((Player)entity)) {
            if (itemInHand != null) {
              Material type=itemInHand.getType();
              if (type == Material.EGG || type == Material.MONSTER_EGG || type == Material.WHEAT || type == Material.CARROT_ITEM || type == Material.SEEDS) {
                if (DEBUG2)                 plugin.getLogger().info("String_Node_Str");
                if (!culprits.contains((Player)entity)) {
                  culprits.add(((Player)entity));
                }
              }
            }
          }
        }
      }
    }
  }
  if (DEBUG2)   plugin.getLogger().info("String_Node_Str");
  if (Settings.createNether && Settings.newNether && ASkyBlock.getNetherWorld() != null) {
    for (int x=island.getMinProtectedX() / 16; x <= (island.getMinProtectedX() + island.getProtectionSize() - 1) / 16; x++) {
      for (int z=island.getMinProtectedZ() / 16; z <= (island.getMinProtectedZ() + island.getProtectionSize() - 1) / 16; z++) {
        for (        Entity entity : ASkyBlock.getNetherWorld().getChunkAt(x,z).getEntities()) {
          if (entity instanceof Animals || entity.getType().equals(EntityType.SQUID)) {
            if (DEBUG2)             plugin.getLogger().info("String_Node_Str" + animals);
            animals++;
            if (animals >= Settings.breedingLimit) {
              if (DEBUG2)               plugin.getLogger().info("String_Node_Str" + Settings.breedingLimit);
              overLimit=true;
              animal.remove();
              e.setCancelled(true);
            }
          }
 else           if (entity instanceof Player && e.getSpawnReason() != SpawnReason.SPAWNER && e.getSpawnReason() != SpawnReason.DISPENSE_EGG) {
            for (            ItemStack itemInHand : Util.getPlayerInHandItems(((Player)entity))) {
              Material type=itemInHand.getType();
              if (type == Material.EGG || type == Material.MONSTER_EGG || type == Material.WHEAT || type == Material.CARROT_ITEM || type == Material.SEEDS) {
                if (!culprits.contains((Player)entity)) {
                  culprits.add(((Player)entity));
                }
              }
            }
          }
        }
      }
    }
  }
  if (overLimit) {
    if (e.getSpawnReason() != SpawnReason.SPAWNER) {
      plugin.getLogger().warning("String_Node_Str" + island.getCenter().getBlockX() + "String_Node_Str"+ island.getCenter().getBlockZ()+ "String_Node_Str"+ Settings.breedingLimit);
      for (      Player player : culprits) {
        Util.sendMessage(player,ChatColor.RED + plugin.myLocale(player.getUniqueId()).moblimitsError.replace("String_Node_Str",String.valueOf(Settings.breedingLimit)));
        plugin.getLogger().warning(player.getName() + "String_Node_Str" + Util.getPlayerInHandItems(player).toString());
      }
    }
  }
}