title: For loop just returns last string in array
body: <p>This code should rename each item in <code>Kits</code> that you configure in the <em>config.yml</em>.
  However, iterating through the array that holds all the names, just renames all the items to the last string in the array.</p>
  
  <pre><code>try {
  
      String getKits = getConfig().getString("Kits." + args[0] + ".Items");
  
      String[] kits = getKits.split(",");
  
      for (String s1 : kits) {
  
          String[] singleKits = s1.split("-");
  
          ItemStack kit = new ItemStack(Integer.valueOf(singleKits[0]), Integer.valueOf(singleKits[1]));
          ItemMeta kitDisplayName = kit.getItemMeta();
  
          String[] itemNames = getConfig().getString("Kits." + args[0] + ".names").split(",");
  
          for (int i = 0; i &lt; itemNames.length; i++) {
              kitDisplayName.setDisplayName(itemNames[i]);
              kit.setItemMeta(kitDisplayName);
          }
  
          pInv.addItem(kit);
  
      }
  
  } catch (Exception e) {
      e.printStackTrace();
  }
  </code></pre>