Program: 33953
Project: 33953
Buggy source:
/** 
 * Presents a GUI for toggling or viewing settings
 * @param player
 * @return
 */
public Inventory islandGuardPanel(Player player){
  UUID uuid=player.getUniqueId();
  Island island=plugin.getGrid().getProtectedIslandAt(player.getLocation());
  List<IPItem> ip=new ArrayList<IPItem>();
  Inventory newPanel=null;
  if (island == null) {
    ip.add(new IPItem(Material.MAP,plugin.myLocale(uuid).igsSettingsGeneralTitle,plugin.myLocale(uuid).igsSettingsGeneralDesc));
    ip.add(new IPItem(Settings.allowAnvilUse,Material.ANVIL,plugin.myLocale(uuid).igsAnvil));
    if (clazz != null) {
      ip.add(new IPItem(Settings.allowArmorStandUse,Material.ARMOR_STAND,plugin.myLocale(uuid).igsArmorStand));
    }
    ip.add(new IPItem(Settings.allowBeaconAccess,Material.BEACON,plugin.myLocale(uuid).igsBeacon));
    ip.add(new IPItem(Settings.allowBedUse,Material.BED,plugin.myLocale(uuid).igsBed));
    ip.add(new IPItem(Settings.allowBreakBlocks,Material.STONE,plugin.myLocale(uuid).igsBreakBlocks));
    ip.add(new IPItem(Settings.allowBreeding,Material.CARROT_ITEM,plugin.myLocale(uuid).igsBreeding));
    ip.add(new IPItem(Settings.allowBrewing,Material.BREWING_STAND_ITEM,plugin.myLocale(uuid).igsBrewing));
    ip.add(new IPItem(Settings.allowBucketUse,Material.LAVA_BUCKET,plugin.myLocale(uuid).igsBucket));
    ip.add(new IPItem(Settings.allowChestAccess,Material.CHEST,plugin.myLocale(uuid).igsChest));
    ip.add(new IPItem(Settings.allowChestDamage,Material.CHEST,plugin.myLocale(uuid).igsChestDamage));
    ip.add(new IPItem(Settings.allowCrafting,Material.WORKBENCH,plugin.myLocale(uuid).igsWorkbench));
    ip.add(new IPItem(Settings.allowCreeperDamage,Material.SKULL_ITEM,4,plugin.myLocale(uuid).igsCreeperDamage));
    ip.add(new IPItem(Settings.allowCreeperGriefing,Material.SKULL_ITEM,4,plugin.myLocale(uuid).igsCreeperGriefing));
    ip.add(new IPItem(Settings.allowCropTrample,Material.WHEAT,plugin.myLocale(uuid).igsCropTrampling));
    ip.add(new IPItem(Settings.allowDoorUse,Material.WOOD_DOOR,plugin.myLocale(uuid).igsDoor));
    ip.add(new IPItem(Settings.allowEnchanting,Material.ENCHANTMENT_TABLE,plugin.myLocale(uuid).igsEnchanting));
    ip.add(new IPItem(Settings.allowEnderPearls,Material.ENDER_PEARL,plugin.myLocale(uuid).igsEnderPearl));
    ip.add(new IPItem(Settings.allowFurnaceUse,Material.FURNACE,plugin.myLocale(uuid).igsFurnace));
    ip.add(new IPItem(Settings.allowGateUse,Material.FENCE_GATE,plugin.myLocale(uuid).igsGate));
    ip.add(new IPItem(Settings.allowHorseInvAccess,Material.GOLD_BARDING,plugin.myLocale(uuid).igsHorseInvAccess));
    ip.add(new IPItem(Settings.allowHorseRiding,Material.DIAMOND_BARDING,plugin.myLocale(uuid).igsHorseRiding));
    ip.add(new IPItem(Settings.allowHurtMobs,Material.EGG,plugin.myLocale(uuid).igsHurtAnimals));
    ip.add(new IPItem(Settings.allowLeashUse,Material.LEASH,plugin.myLocale(uuid).igsLeash));
    ip.add(new IPItem(Settings.allowLeverButtonUse,Material.LEVER,plugin.myLocale(uuid).igsLever));
    ip.add(new IPItem(Settings.allowMusic,Material.JUKEBOX,plugin.myLocale(uuid).igsJukebox));
    ip.add(new IPItem(Settings.allowPlaceBlocks,Material.DIRT,plugin.myLocale(uuid).igsPlaceBlocks));
    ip.add(new IPItem(Settings.allowPortalUse,Material.OBSIDIAN,plugin.myLocale(uuid).igsPortalUse));
    ip.add(new IPItem(Settings.allowPressurePlate,Material.GOLD_PLATE,plugin.myLocale(uuid).igsPressurePlate));
    ip.add(new IPItem(Settings.allowPvP,Material.ARROW,plugin.myLocale(uuid).igsPVP));
    ip.add(new IPItem(Settings.allowNetherPvP,Material.NETHERRACK,plugin.myLocale(uuid).igsNetherPVP));
    ip.add(new IPItem(Settings.allowRedStone,Material.REDSTONE_COMPARATOR,plugin.myLocale(uuid).igsRedstone));
    ip.add(new IPItem(!Settings.restrictWither,Material.SKULL_ITEM,1,plugin.myLocale(uuid).igsWitherDamage));
    ip.add(new IPItem(Settings.allowShearing,Material.SHEARS,plugin.myLocale(uuid).igsShears));
    ip.add(new IPItem(Settings.allowTNTDamage,Material.TNT,plugin.myLocale(uuid).igsTNT));
    ip.add(new IPItem(Settings.allowVisitorItemDrop,Material.GOLD_INGOT,plugin.myLocale(uuid).igsVisitorDrop));
    ip.add(new IPItem(Settings.allowVisitorItemPickup,Material.DIAMOND,plugin.myLocale(uuid).igsVisitorPickUp));
    ip.add(new IPItem(Settings.allowVisitorKeepInvOnDeath,Material.IRON_CHESTPLATE,plugin.myLocale(uuid).igsVisitorKeep));
    ip.add(new IPItem(Settings.allowVillagerTrading,Material.EMERALD,plugin.myLocale(uuid).igsVillagerTrading));
    if (hasChorusFruit) {
      ip.add(new IPItem(Settings.allowChorusFruit,Material.CHORUS_FRUIT,plugin.myLocale(uuid).igsChorusFruit));
    }
    ip.add(new IPItem(Settings.enableJoinAndLeaveIslandMessages,Material.NOTE_BLOCK,plugin.myLocale(uuid).igsJoinLeaveIslandMessage));
    ip.add(new IPItem(Settings.allowMobSpawning,Material.MOB_SPAWNER,plugin.myLocale(uuid).igsMobSpawning));
  }
 else   if (island.isSpawn()) {
    ip.add(new IPItem(Material.MAP,plugin.myLocale(uuid).igsSettingsSpawnTitle,plugin.myLocale(uuid).igsSettingsSpawnDesc));
    ip.add(new IPItem(Settings.allowSpawnAnvilUse,Material.ANVIL,plugin.myLocale(uuid).igsAnvil));
    if (clazz != null) {
      ip.add(new IPItem(Settings.allowArmorStandUse,Material.ARMOR_STAND,plugin.myLocale(uuid).igsArmorStand));
    }
    ip.add(new IPItem(Settings.allowSpawnBeaconAccess,Material.BEACON,plugin.myLocale(uuid).igsBeacon));
    ip.add(new IPItem(Settings.allowBedUse,Material.BED,plugin.myLocale(uuid).igsBed));
    ip.add(new IPItem(Settings.allowSpawnBreakBlocks,Material.STONE,plugin.myLocale(uuid).igsBreakBlocks));
    ip.add(new IPItem(Settings.allowBreeding,Material.CARROT_ITEM,plugin.myLocale(uuid).igsBreeding));
    ip.add(new IPItem(Settings.allowSpawnBrewing,Material.BREWING_STAND_ITEM,plugin.myLocale(uuid).igsBrewing));
    ip.add(new IPItem(Settings.allowBucketUse,Material.LAVA_BUCKET,plugin.myLocale(uuid).igsBucket));
    ip.add(new IPItem(Settings.allowSpawnChestAccess,Material.CHEST,plugin.myLocale(uuid).igsChest));
    ip.add(new IPItem(Settings.allowSpawnCrafting,Material.WORKBENCH,plugin.myLocale(uuid).igsWorkbench));
    ip.add(new IPItem(Settings.allowCropTrample,Material.WHEAT,plugin.myLocale(uuid).igsCropTrampling));
    ip.add(new IPItem(Settings.allowSpawnDoorUse,Material.WOOD_DOOR,plugin.myLocale(uuid).igsDoor));
    ip.add(new IPItem(Settings.allowSpawnEnchanting,Material.ENCHANTMENT_TABLE,plugin.myLocale(uuid).igsEnchanting));
    ip.add(new IPItem(Settings.allowEnderPearls,Material.ENDER_PEARL,plugin.myLocale(uuid).igsEnderPearl));
    ip.add(new IPItem(Settings.allowSpawnFurnaceUse,Material.FURNACE,plugin.myLocale(uuid).igsFurnace));
    ip.add(new IPItem(Settings.allowSpawnGateUse,Material.FENCE_GATE,plugin.myLocale(uuid).igsGate));
    ip.add(new IPItem(Settings.allowSpawnHorseInvAccess,Material.GOLD_BARDING,plugin.myLocale(uuid).igsHorseInvAccess));
    ip.add(new IPItem(Settings.allowSpawnHorseRiding,Material.DIAMOND_BARDING,plugin.myLocale(uuid).igsHorseRiding));
    ip.add(new IPItem(Settings.allowHurtMobs,Material.EGG,plugin.myLocale(uuid).igsHurtAnimals));
    ip.add(new IPItem(Settings.allowLeashUse,Material.LEASH,plugin.myLocale(uuid).igsLeash));
    ip.add(new IPItem(Settings.allowSpawnLeverButtonUse,Material.LEVER,plugin.myLocale(uuid).igsLever));
    ip.add(new IPItem(Settings.allowSpawnMusic,Material.JUKEBOX,plugin.myLocale(uuid).igsJukebox));
    ip.add(new IPItem(Settings.allowSpawnPlaceBlocks,Material.DIRT,plugin.myLocale(uuid).igsPlaceBlocks));
    ip.add(new IPItem(Settings.allowPortalUse,Material.OBSIDIAN,plugin.myLocale(uuid).igsPortalUse));
    ip.add(new IPItem(Settings.allowSpawnPressurePlate,Material.GOLD_PLATE,plugin.myLocale(uuid).igsPressurePlate));
    ip.add(new IPItem(Settings.allowPvP,Material.ARROW,plugin.myLocale(uuid).igsPVP));
    ip.add(new IPItem(Settings.allowNetherPvP,Material.NETHERRACK,plugin.myLocale(uuid).igsNetherPVP));
    ip.add(new IPItem(Settings.allowSpawnRedStone,Material.REDSTONE_COMPARATOR,plugin.myLocale(uuid).igsRedstone));
    ip.add(new IPItem(Settings.allowSpawnShearing,Material.SHEARS,plugin.myLocale(uuid).igsShears));
    ip.add(new IPItem(Settings.allowSpawnVillagerTrading,Material.EMERALD,plugin.myLocale(uuid).igsVillagerTrading));
    if (hasChorusFruit) {
      ip.add(new IPItem(Settings.allowSpawnChorusFruit,Material.CHORUS_FRUIT,plugin.myLocale(uuid).igsChorusFruit));
    }
  }
 else {
    ip.add(new IPItem(Material.MAP,plugin.myLocale(uuid).igsSettingsIslandTitle,plugin.myLocale(uuid).igsSettingsIslandDesc));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowAnvilUse),Material.ANVIL,plugin.myLocale(uuid).igsAnvil));
    if (clazz != null) {
      ip.add(new IPItem(island.getIgsFlag(Flags.allowArmorStandUse),Material.ARMOR_STAND,plugin.myLocale(uuid).igsArmorStand));
    }
    ip.add(new IPItem(island.getIgsFlag(Flags.allowBeaconAccess),Material.BEACON,plugin.myLocale(uuid).igsBeacon));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowBedUse),Material.BED,plugin.myLocale(uuid).igsBed));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowBreakBlocks),Material.STONE,plugin.myLocale(uuid).igsBreakBlocks));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowBreeding),Material.CARROT_ITEM,plugin.myLocale(uuid).igsBreeding));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowBrewing),Material.BREWING_STAND_ITEM,plugin.myLocale(uuid).igsBrewing));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowBucketUse),Material.LAVA_BUCKET,plugin.myLocale(uuid).igsBucket));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowChestAccess),Material.CHEST,plugin.myLocale(uuid).igsChest));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowCrafting),Material.WORKBENCH,plugin.myLocale(uuid).igsWorkbench));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowCropTrample),Material.WHEAT,plugin.myLocale(uuid).igsCropTrampling));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowDoorUse),Material.WOOD_DOOR,plugin.myLocale(uuid).igsDoor));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowEnchanting),Material.ENCHANTMENT_TABLE,plugin.myLocale(uuid).igsEnchanting));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowEnderPearls),Material.ENDER_PEARL,plugin.myLocale(uuid).igsEnderPearl));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowFurnaceUse),Material.FURNACE,plugin.myLocale(uuid).igsFurnace));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowGateUse),Material.FENCE_GATE,plugin.myLocale(uuid).igsGate));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowHorseInvAccess),Material.GOLD_BARDING,plugin.myLocale(uuid).igsHorseInvAccess));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowHorseRiding),Material.DIAMOND_BARDING,plugin.myLocale(uuid).igsHorseRiding));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowHurtMobs),Material.EGG,plugin.myLocale(uuid).igsHurtAnimals));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowLeashUse),Material.LEASH,plugin.myLocale(uuid).igsLeash));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowLeverButtonUse),Material.LEVER,plugin.myLocale(uuid).igsLever));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowMusic),Material.JUKEBOX,plugin.myLocale(uuid).igsJukebox));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowPlaceBlocks),Material.DIRT,plugin.myLocale(uuid).igsPlaceBlocks));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowPortalUse),Material.OBSIDIAN,plugin.myLocale(uuid).igsPortalUse));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowPressurePlate),Material.GOLD_PLATE,plugin.myLocale(uuid).igsPressurePlate));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowPvP),Material.ARROW,plugin.myLocale(uuid).igsPVP));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowNetherPvP),Material.NETHERRACK,plugin.myLocale(uuid).igsNetherPVP));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowRedStone),Material.REDSTONE_COMPARATOR,plugin.myLocale(uuid).igsRedstone));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowShearing),Material.SHEARS,plugin.myLocale(uuid).igsShears));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowVillagerTrading),Material.EMERALD,plugin.myLocale(uuid).igsVillagerTrading));
    if (hasChorusFruit) {
      ip.add(new IPItem(island.getIgsFlag(Flags.allowChorusFruit),Material.CHORUS_FRUIT,plugin.myLocale(uuid).igsChorusFruit));
    }
    ip.add(new IPItem(island.getIgsFlag(Flags.enableJoinAndLeaveIslandMessages),Material.NOTE_BLOCK,plugin.myLocale(uuid).igsJoinLeaveIslandMessage));
  }
  if (ip.size() > 0) {
    int size=ip.size() + 8;
    size-=(size % 9);
    String title=plugin.myLocale(uuid).igsTitle;
    if (title.length() > 32) {
      title=title.substring(0,31);
    }
    newPanel=Bukkit.createInventory(null,size,title);
    int slot=0;
    for (    IPItem i : ip) {
      i.setSlot(slot);
      newPanel.addItem(i.getItem());
    }
  }
  return newPanel;
}

Fixed version (ground truth):
/** 
 * Presents a GUI for toggling or viewing settings
 * @param player
 * @return
 */
public Inventory islandGuardPanel(Player player){
  UUID uuid=player.getUniqueId();
  Island island=plugin.getGrid().getProtectedIslandAt(player.getLocation());
  List<IPItem> ip=new ArrayList<IPItem>();
  Inventory newPanel=null;
  if (island == null) {
    ip.add(new IPItem(Material.MAP,plugin.myLocale(uuid).igsSettingsGeneralTitle,plugin.myLocale(uuid).igsSettingsGeneralDesc));
    ip.add(new IPItem(Settings.allowAnvilUse,Material.ANVIL,plugin.myLocale(uuid).igsAnvil));
    if (clazz != null) {
      ip.add(new IPItem(Settings.allowArmorStandUse,Material.ARMOR_STAND,plugin.myLocale(uuid).igsArmorStand));
    }
    ip.add(new IPItem(Settings.allowBeaconAccess,Material.BEACON,plugin.myLocale(uuid).igsBeacon));
    ip.add(new IPItem(Settings.allowBedUse,Material.BED,plugin.myLocale(uuid).igsBed));
    ip.add(new IPItem(Settings.allowBreakBlocks,Material.STONE,plugin.myLocale(uuid).igsBreakBlocks));
    ip.add(new IPItem(Settings.allowBreeding,Material.CARROT_ITEM,plugin.myLocale(uuid).igsBreeding));
    ip.add(new IPItem(Settings.allowBrewing,Material.BREWING_STAND_ITEM,plugin.myLocale(uuid).igsBrewing));
    ip.add(new IPItem(Settings.allowBucketUse,Material.LAVA_BUCKET,plugin.myLocale(uuid).igsBucket));
    ip.add(new IPItem(Settings.allowChestAccess,Material.CHEST,plugin.myLocale(uuid).igsChest));
    ip.add(new IPItem(Settings.allowChestDamage,Material.CHEST,plugin.myLocale(uuid).igsChestDamage));
    ip.add(new IPItem(Settings.allowCrafting,Material.WORKBENCH,plugin.myLocale(uuid).igsWorkbench));
    ip.add(new IPItem(Settings.allowCreeperDamage,Material.SKULL_ITEM,4,plugin.myLocale(uuid).igsCreeperDamage));
    ip.add(new IPItem(Settings.allowCreeperGriefing,Material.SKULL_ITEM,4,plugin.myLocale(uuid).igsCreeperGriefing));
    ip.add(new IPItem(Settings.allowCropTrample,Material.WHEAT,plugin.myLocale(uuid).igsCropTrampling));
    ip.add(new IPItem(Settings.allowDoorUse,Material.WOOD_DOOR,plugin.myLocale(uuid).igsDoor));
    ip.add(new IPItem(Settings.allowEnchanting,Material.ENCHANTMENT_TABLE,plugin.myLocale(uuid).igsEnchanting));
    ip.add(new IPItem(Settings.allowEnderPearls,Material.ENDER_PEARL,plugin.myLocale(uuid).igsEnderPearl));
    ip.add(new IPItem(Settings.allowFurnaceUse,Material.FURNACE,plugin.myLocale(uuid).igsFurnace));
    ip.add(new IPItem(Settings.allowGateUse,Material.FENCE_GATE,plugin.myLocale(uuid).igsGate));
    ip.add(new IPItem(Settings.allowHorseInvAccess,Material.GOLD_BARDING,plugin.myLocale(uuid).igsHorseInvAccess));
    ip.add(new IPItem(Settings.allowHorseRiding,Material.DIAMOND_BARDING,plugin.myLocale(uuid).igsHorseRiding));
    ip.add(new IPItem(Settings.allowHurtMobs,Material.EGG,plugin.myLocale(uuid).igsHurtAnimals));
    ip.add(new IPItem(Settings.allowLeashUse,Material.LEASH,plugin.myLocale(uuid).igsLeash));
    ip.add(new IPItem(Settings.allowLeverButtonUse,Material.LEVER,plugin.myLocale(uuid).igsLever));
    ip.add(new IPItem(Settings.allowMusic,Material.JUKEBOX,plugin.myLocale(uuid).igsJukebox));
    ip.add(new IPItem(Settings.allowPlaceBlocks,Material.DIRT,plugin.myLocale(uuid).igsPlaceBlocks));
    ip.add(new IPItem(Settings.allowPortalUse,Material.OBSIDIAN,plugin.myLocale(uuid).igsPortalUse));
    ip.add(new IPItem(Settings.allowPressurePlate,Material.GOLD_PLATE,plugin.myLocale(uuid).igsPressurePlate));
    ip.add(new IPItem(Settings.allowPvP,Material.ARROW,plugin.myLocale(uuid).igsPVP));
    ip.add(new IPItem(Settings.allowNetherPvP,Material.NETHERRACK,plugin.myLocale(uuid).igsNetherPVP));
    ip.add(new IPItem(Settings.allowRedStone,Material.REDSTONE_COMPARATOR,plugin.myLocale(uuid).igsRedstone));
    ip.add(new IPItem(!Settings.restrictWither,Material.SKULL_ITEM,1,plugin.myLocale(uuid).igsWitherDamage));
    ip.add(new IPItem(Settings.allowShearing,Material.SHEARS,plugin.myLocale(uuid).igsShears));
    ip.add(new IPItem(Settings.allowTNTDamage,Material.TNT,plugin.myLocale(uuid).igsTNT));
    ip.add(new IPItem(Settings.allowVisitorItemDrop,Material.GOLD_INGOT,plugin.myLocale(uuid).igsVisitorDrop));
    ip.add(new IPItem(Settings.allowVisitorItemPickup,Material.DIAMOND,plugin.myLocale(uuid).igsVisitorPickUp));
    ip.add(new IPItem(Settings.allowVisitorKeepInvOnDeath,Material.IRON_CHESTPLATE,plugin.myLocale(uuid).igsVisitorKeep));
    ip.add(new IPItem(Settings.allowVillagerTrading,Material.EMERALD,plugin.myLocale(uuid).igsVillagerTrading));
    if (hasChorusFruit) {
      ip.add(new IPItem(Settings.allowChorusFruit,Material.CHORUS_FRUIT,plugin.myLocale(uuid).igsChorusFruit));
    }
    ip.add(new IPItem(Settings.enableJoinAndLeaveIslandMessages,Material.NOTE_BLOCK,plugin.myLocale(uuid).igsJoinLeaveIslandMessage));
    ip.add(new IPItem(Settings.allowMobSpawning,Material.MOB_SPAWNER,plugin.myLocale(uuid).igsMobSpawning));
  }
 else   if (island.isSpawn()) {
    ip.add(new IPItem(Material.MAP,plugin.myLocale(uuid).igsSettingsSpawnTitle,plugin.myLocale(uuid).igsSettingsSpawnDesc));
    ip.add(new IPItem(Settings.allowSpawnAnvilUse,Material.ANVIL,plugin.myLocale(uuid).igsAnvil));
    if (clazz != null) {
      ip.add(new IPItem(Settings.allowArmorStandUse,Material.ARMOR_STAND,plugin.myLocale(uuid).igsArmorStand));
    }
    ip.add(new IPItem(Settings.allowSpawnBeaconAccess,Material.BEACON,plugin.myLocale(uuid).igsBeacon));
    ip.add(new IPItem(Settings.allowBedUse,Material.BED,plugin.myLocale(uuid).igsBed));
    ip.add(new IPItem(Settings.allowSpawnBreakBlocks,Material.STONE,plugin.myLocale(uuid).igsBreakBlocks));
    ip.add(new IPItem(Settings.allowBreeding,Material.CARROT_ITEM,plugin.myLocale(uuid).igsBreeding));
    ip.add(new IPItem(Settings.allowSpawnBrewing,Material.BREWING_STAND_ITEM,plugin.myLocale(uuid).igsBrewing));
    ip.add(new IPItem(Settings.allowBucketUse,Material.LAVA_BUCKET,plugin.myLocale(uuid).igsBucket));
    ip.add(new IPItem(Settings.allowSpawnChestAccess,Material.CHEST,plugin.myLocale(uuid).igsChest));
    ip.add(new IPItem(Settings.allowSpawnCrafting,Material.WORKBENCH,plugin.myLocale(uuid).igsWorkbench));
    ip.add(new IPItem(Settings.allowCropTrample,Material.WHEAT,plugin.myLocale(uuid).igsCropTrampling));
    ip.add(new IPItem(Settings.allowSpawnDoorUse,Material.WOOD_DOOR,plugin.myLocale(uuid).igsDoor));
    ip.add(new IPItem(Settings.allowSpawnEnchanting,Material.ENCHANTMENT_TABLE,plugin.myLocale(uuid).igsEnchanting));
    ip.add(new IPItem(Settings.allowEnderPearls,Material.ENDER_PEARL,plugin.myLocale(uuid).igsEnderPearl));
    ip.add(new IPItem(Settings.allowSpawnFurnaceUse,Material.FURNACE,plugin.myLocale(uuid).igsFurnace));
    ip.add(new IPItem(Settings.allowSpawnGateUse,Material.FENCE_GATE,plugin.myLocale(uuid).igsGate));
    ip.add(new IPItem(Settings.allowSpawnHorseInvAccess,Material.GOLD_BARDING,plugin.myLocale(uuid).igsHorseInvAccess));
    ip.add(new IPItem(Settings.allowSpawnHorseRiding,Material.DIAMOND_BARDING,plugin.myLocale(uuid).igsHorseRiding));
    ip.add(new IPItem(Settings.allowHurtMobs,Material.EGG,plugin.myLocale(uuid).igsHurtAnimals));
    ip.add(new IPItem(Settings.allowLeashUse,Material.LEASH,plugin.myLocale(uuid).igsLeash));
    ip.add(new IPItem(Settings.allowSpawnLeverButtonUse,Material.LEVER,plugin.myLocale(uuid).igsLever));
    ip.add(new IPItem(Settings.allowSpawnMusic,Material.JUKEBOX,plugin.myLocale(uuid).igsJukebox));
    ip.add(new IPItem(Settings.allowSpawnPlaceBlocks,Material.DIRT,plugin.myLocale(uuid).igsPlaceBlocks));
    ip.add(new IPItem(Settings.allowPortalUse,Material.OBSIDIAN,plugin.myLocale(uuid).igsPortalUse));
    ip.add(new IPItem(Settings.allowSpawnPressurePlate,Material.GOLD_PLATE,plugin.myLocale(uuid).igsPressurePlate));
    ip.add(new IPItem(Settings.allowPvP,Material.ARROW,plugin.myLocale(uuid).igsPVP));
    ip.add(new IPItem(Settings.allowNetherPvP,Material.NETHERRACK,plugin.myLocale(uuid).igsNetherPVP));
    ip.add(new IPItem(Settings.allowSpawnRedStone,Material.REDSTONE_COMPARATOR,plugin.myLocale(uuid).igsRedstone));
    ip.add(new IPItem(Settings.allowSpawnShearing,Material.SHEARS,plugin.myLocale(uuid).igsShears));
    ip.add(new IPItem(Settings.allowSpawnVillagerTrading,Material.EMERALD,plugin.myLocale(uuid).igsVillagerTrading));
    if (hasChorusFruit) {
      ip.add(new IPItem(Settings.allowSpawnChorusFruit,Material.CHORUS_FRUIT,plugin.myLocale(uuid).igsChorusFruit));
    }
  }
 else {
    ip.add(new IPItem(Material.MAP,plugin.myLocale(uuid).igsSettingsIslandTitle,plugin.myLocale(uuid).igsSettingsIslandDesc));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowAnvilUse),Material.ANVIL,plugin.myLocale(uuid).igsAnvil));
    if (clazz != null) {
      ip.add(new IPItem(island.getIgsFlag(Flags.allowArmorStandUse),Material.ARMOR_STAND,plugin.myLocale(uuid).igsArmorStand));
    }
    ip.add(new IPItem(island.getIgsFlag(Flags.allowBeaconAccess),Material.BEACON,plugin.myLocale(uuid).igsBeacon));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowBedUse),Material.BED,plugin.myLocale(uuid).igsBed));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowBreakBlocks),Material.STONE,plugin.myLocale(uuid).igsBreakBlocks));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowBreeding),Material.CARROT_ITEM,plugin.myLocale(uuid).igsBreeding));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowBrewing),Material.BREWING_STAND_ITEM,plugin.myLocale(uuid).igsBrewing));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowBucketUse),Material.LAVA_BUCKET,plugin.myLocale(uuid).igsBucket));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowChestAccess),Material.CHEST,plugin.myLocale(uuid).igsChest));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowCrafting),Material.WORKBENCH,plugin.myLocale(uuid).igsWorkbench));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowCropTrample),Material.WHEAT,plugin.myLocale(uuid).igsCropTrampling));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowDoorUse),Material.WOOD_DOOR,plugin.myLocale(uuid).igsDoor));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowEnchanting),Material.ENCHANTMENT_TABLE,plugin.myLocale(uuid).igsEnchanting));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowEnderPearls),Material.ENDER_PEARL,plugin.myLocale(uuid).igsEnderPearl));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowFurnaceUse),Material.FURNACE,plugin.myLocale(uuid).igsFurnace));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowGateUse),Material.FENCE_GATE,plugin.myLocale(uuid).igsGate));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowHorseInvAccess),Material.GOLD_BARDING,plugin.myLocale(uuid).igsHorseInvAccess));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowHorseRiding),Material.DIAMOND_BARDING,plugin.myLocale(uuid).igsHorseRiding));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowHurtMobs),Material.EGG,plugin.myLocale(uuid).igsHurtAnimals));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowLeashUse),Material.LEASH,plugin.myLocale(uuid).igsLeash));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowLeverButtonUse),Material.LEVER,plugin.myLocale(uuid).igsLever));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowMusic),Material.JUKEBOX,plugin.myLocale(uuid).igsJukebox));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowPlaceBlocks),Material.DIRT,plugin.myLocale(uuid).igsPlaceBlocks));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowPortalUse),Material.OBSIDIAN,plugin.myLocale(uuid).igsPortalUse));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowPressurePlate),Material.GOLD_PLATE,plugin.myLocale(uuid).igsPressurePlate));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowPvP),Material.ARROW,plugin.myLocale(uuid).igsPVP));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowNetherPvP),Material.NETHERRACK,plugin.myLocale(uuid).igsNetherPVP));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowRedStone),Material.REDSTONE_COMPARATOR,plugin.myLocale(uuid).igsRedstone));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowShearing),Material.SHEARS,plugin.myLocale(uuid).igsShears));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowVillagerTrading),Material.EMERALD,plugin.myLocale(uuid).igsVillagerTrading));
    if (hasChorusFruit) {
      ip.add(new IPItem(island.getIgsFlag(Flags.allowChorusFruit),Material.CHORUS_FRUIT,plugin.myLocale(uuid).igsChorusFruit));
    }
    ip.add(new IPItem(island.getIgsFlag(Flags.enableJoinAndLeaveIslandMessages),Material.NOTE_BLOCK,plugin.myLocale(uuid).igsJoinLeaveIslandMessage));
    ip.add(new IPItem(island.getIgsFlag(Flags.allowMobSpawning),Material.MOB_SPAWNER,plugin.myLocale(uuid).igsMobSpawning));
  }
  if (ip.size() > 0) {
    int size=ip.size() + 8;
    size-=(size % 9);
    String title=plugin.myLocale(uuid).igsTitle;
    if (title.length() > 32) {
      title=title.substring(0,31);
    }
    newPanel=Bukkit.createInventory(null,size,title);
    int slot=0;
    for (    IPItem i : ip) {
      i.setSlot(slot);
      newPanel.addItem(i.getItem());
    }
  }
  return newPanel;
}