title: onCommand nullpointer Error
body: <p>This code keeps giving an error when I perform the command, I've fixed a few variable mistakes but that still doesn't fix it. </p>
  
  <p>Can anyone help me out? It's a null pointer, but I don't see anything that gives a null. Thanks!     </p>
  
  <pre><code>@SuppressWarnings("deprecation")
  public boolean onCommand(CommandSender sender, Command cmd, 
      String label, String[]args){
      if(cmd.getName().equalsIgnoreCase("shop")){
          if(sender instanceof Player){
             Player p=(Player)sender;
             //all itemstack were made at the top given static
             ItemMeta lore=hasMoney.getItemMeta();//the amount of money they have set to a lore
             ArrayList&lt;String&gt; loreText=new ArrayList&lt;String&gt;();
             lore.setDisplayName(ChatColor.GOLD+""+ChatColor.BOLD+"Gears");
             loreText.add(ChatColor.GREEN+"You have:");
  
             loreText.add(ChatColor.GOLD
                          +econ.format(econ.getBalance(p.getName()))
                          +ChatColor.GREEN+"Gears");
  
             lore.setLore(loreText);
             hasMoney.setItemMeta(lore);
  
             switch(getConfig().getInt(p.getName() + ".helm", 0)){
             case 0:
                 ItemMeta lorehelm=helm.getItemMeta();//current helmet they have
                 helm.setType(Material.LEATHER_HELMET);
                 ArrayList&lt;String&gt; loreTextHelm=new ArrayList&lt;String&gt;();
  
                 lorehelm.setDisplayName(ChatColor.GOLD+""
                                                     +ChatColor.BOLD+"Helmet");
  
                 loreTextHelm.add(ChatColor.GREEN+"You have:");
                 loreTextHelm.add(ChatColor.GOLD+"Basic Helmet");
                 lorehelm.setLore(loreTextHelm);
                 helm.setItemMeta(lorehelm); 
  
                 ItemMeta lorehelmn=nextHelm.getItemMeta();//this is next helmet to purchase
                 nextHelm.setType(Material.GOLD_HELMET);
                 ArrayList&lt;String&gt; loreTextHelmn=new ArrayList&lt;String&gt;();
  
                 lorehelm.setDisplayName(ChatColor.GOLD+""+
                                                      ChatColor.BOLD+"Helmet");
  
                 loreTextHelmn.add(ChatColor.GREEN+"Lvl 1 Helmet");
                 loreTextHelmn.add(ChatColor.GOLD+"50 Gears");
                 lorehelmn.setLore(loreTextHelmn);
                 nextHelm.setItemMeta(lorehelmn); 
  
             case 1:
                 ItemMeta lorehelm1=helm.getItemMeta();
                 helm.setType(Material.GOLD_HELMET);
  
                 helm.addEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, 1);
  
                 ArrayList&lt;String&gt; loreTextHelm1=new ArrayList&lt;String&gt;();
  
           lorehelm1.setDisplayName(ChatColor.GOLD+""+ChatColor.BOLD+"Helmet");
  
                 loreTextHelm1.add(ChatColor.GOLD+"You have: ");
                 loreTextHelm1.add(ChatColor.GOLD+"Lvl 1 Helmet");
                 lorehelm1.setLore(loreTextHelm1);
                 helm.setItemMeta(lorehelm1);         
          }
          myInventory.setItem(0, helm);
          myInventory.setItem(9, nextHelm);
          myInventory.setItem(23, hasMoney);
  
          p.openInventory(myInventory); 
          return true;}else if(sender instanceof ConsoleCommandSender){sender.sendMessage("You can't do that from here!");return true;}
          else{return false;}
  
  
      }//ive ended the oncommand later down 
  </code></pre>
  
  <p>This is the error:</p>
  
  <pre><code>org.bukkit.command.CommandException: Unhandled exception executing command 'shop' in plugin Gearbox_PvP v0.1
      at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[spigot-1.8.8.jar:git-Spigot-db6de12-039621d]
      at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) ~[spigot-1.8.8.jar:git-Spigot-db6de12-039621d]
      at org.bukkit.craftbukkit.v1_8_R3.CraftServer.dispatchCommand(CraftServer.java:641) ~[spigot-1.8.8.jar:git-Spigot-db6de12-039621d]
      at net.minecraft.server.v1_8_R3.PlayerConnection.handleCommand(PlayerConnection.java:1162) [spigot-1.8.8.jar:git-Spigot-db6de12-039621d]
      at net.minecraft.server.v1_8_R3.PlayerConnection.a(PlayerConnection.java:997) [spigot-1.8.8.jar:git-Spigot-db6de12-039621d]
      at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(PacketPlayInChat.java:45) [spigot-1.8.8.jar:git-Spigot-db6de12-039621d]
      at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(PacketPlayInChat.java:1) [spigot-1.8.8.jar:git-Spigot-db6de12-039621d]
      at net.minecraft.server.v1_8_R3.PlayerConnectionUtils$1.run(SourceFile:13) [spigot-1.8.8.jar:git-Spigot-db6de12-039621d]
      at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_71]
      at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_71]
      at net.minecraft.server.v1_8_R3.SystemUtils.a(SourceFile:44) [spigot-1.8.8.jar:git-Spigot-db6de12-039621d]
      at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:715) [spigot-1.8.8.jar:git-Spigot-db6de12-039621d]
      at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:374) [spigot-1.8.8.jar:git-Spigot-db6de12-039621d]
      at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:654) [spigot-1.8.8.jar:git-Spigot-db6de12-039621d]
      at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:557) [spigot-1.8.8.jar:git-Spigot-db6de12-039621d]
      at java.lang.Thread.run(Unknown Source) [?:1.8.0_71]
  **Caused by: java.lang.NullPointerException
      at me.CoderBlazer.Main.onCommand(Main.java:129) ~[?:?]
      at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[spigot-1.8.8.jar:git-Spigot-db6de12-039621d]
      ... 15 more**
  </code></pre>
  
  <p>Here are the itemstacks</p>
  
  <pre><code>static ItemStack hasMoney = new ItemStack(Material.YELLOW_FLOWER, 1);
   static ItemStack helm=new ItemStack(Material.LEATHER_HELMET, 1);
   static ItemStack nextHelm=new ItemStack(Material.GOLD_HELMET, 1);
  </code></pre>