Help is Greatly Appreciated!

Discussion in 'Archived: Plugin Requests' started by TheRedHeadHD, Jun 18, 2014.

  1. Offline

    TheRedHeadHD

    I'm having an error that I can't quite fix: Some help would be nice.

    Code:java
    1. package me.TheRedHeadHD.FactionsPlus.Utilities;
    2.  
    3. import org.bukkit.Bukkit;
    4. import org.bukkit.ChatColor;
    5. import org.bukkit.Material;
    6. import org.bukkit.inventory.ItemStack;
    7. import org.bukkit.inventory.ShapelessRecipe;
    8. import org.bukkit.inventory.meta.ItemMeta;
    9. import org.bukkit.material.MaterialData;
    10.  
    11. public class CreeperArrows
    12. {
    13. public static ItemStack creeperarrow;
    14. public static ItemStack creeperegg;
    15.  
    16. public static void createCreeperArrow()
    17. {
    18. creeperarrow = new ItemStack(Material.ARROW);
    19. ItemMeta creeperarrowmeta = creeperarrow.getItemMeta();
    20. creeperarrowmeta.setDisplayName(ChatColor.DARK_GREEN + "Creeper Arrow");
    21. creeperarrow.setItemMeta(creeperarrowmeta);
    22.  
    23. creeperegg = new ItemStack(Material.MONSTER_EGG,1,(short)50);
    24.  
    25. ShapelessRecipe caRecipe = new ShapelessRecipe(creeperarrow);
    26. caRecipe.addIngredient(1, Material.ARROW);
    27. caRecipe.addIngredient(1, creeperegg);
    28. Bukkit.getServer().addRecipe(caRecipe);
    29. }
    30. }
    31.  


    The error comes in line 27 under the addIngredient method saying: "The method addIngredient(int, MaterialData) in the type ShapelessRecipe is not applicable for the arguments (int, ItemStack)"
     
  2. Offline

    KoolzSkillz

    I don't see where you stated what the inventory is


    I'll post a copy as soon as I get on my computer
     
  3. Offline

    Necrodoom

  4. Offline

    scenecraft

    Wrong Section
     

Share This Page