custom itemstack in recipie???

Discussion in 'Plugin Development' started by vhbob, May 18, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    vhbob

    so im trying to make an ingredent in my recipie a custom itemstack but it does not work, heres my code please help :(
    Code:
    ItemStack pgem = new ItemStack(Material.EMERALD);
            ItemMeta pgemm = pgem.getItemMeta();
            pgemm.setDisplayName(ChatColor.AQUA + "Prestigious gem");
            pgemm.addEnchant(Enchantment.DURABILITY, 3, true);
            pgem.setItemMeta(pgemm);
    
            ShapedRecipe phr = new ShapedRecipe(phelm);
            phr.shape("@@@", "@ @");
            phr.setIngredient('@', pgem.getData());
     
  2. Offline

    techboy291

    You need to add the recipe to the server. From your main class:
    Code:
    getServer().addRecipe(pgem)
     
  3. Offline

    vhbob

    @techboy291 thanks!, i made a bunch more but only the helmets seem to craft, and there all prestigious helmets.... help!!!!!
    Code:
    public void onEnable() {
    
            Bukkit.getServer().getPluginManager().registerEvents(this, this);
            phelm();
            pChest();
            pboots();
            plegs();
            ahelm();
            aChest();
            aboots();
            alegs();
            shelm();
            sChest();
            sboots();
            slegs();
        }
    
        private void phelm() {
    
    
            ItemStack phelm = new ItemStack(Material.DIAMOND_HELMET);
            ItemMeta phm = phelm.getItemMeta();
            phm.addEnchant(Enchantment.DURABILITY, 3, true);
            phm.addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 5, true);
            phm.setDisplayName(ChatColor.DARK_PURPLE + "Prestigious Helm");
            phelm.setItemMeta(phm);
    
            ItemStack pgem = new ItemStack(Material.EMERALD);
            ItemMeta pgemm = pgem.getItemMeta();
            pgemm.setDisplayName(ChatColor.AQUA + "Prestigious gem");
            pgemm.addEnchant(Enchantment.DURABILITY, 3, true);
            pgem.setItemMeta(pgemm);
    
            ShapedRecipe phr = new ShapedRecipe(phelm);
            phr.shape("@@@", "@ @");
            phr.setIngredient('@', pgem.getData());
    
            getServer().addRecipe(phr);
        }
    
        private void pChest() {
    
    
            ItemStack pchest = new ItemStack(Material.DIAMOND_CHESTPLATE);
            ItemMeta pcm = pchest.getItemMeta();
            pcm.addEnchant(Enchantment.DURABILITY, 3, true);
            pcm.addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 5, true);
            pcm.setDisplayName(ChatColor.DARK_PURPLE + "Prestigious Chestpeice");
            pchest.setItemMeta(pcm);
    
            ItemStack pgem = new ItemStack(Material.EMERALD);
            ItemMeta pgemm = pgem.getItemMeta();
            pgemm.setDisplayName(ChatColor.AQUA + "Prestigious gem");
            pgemm.addEnchant(Enchantment.DURABILITY, 3, true);
            pgem.setItemMeta(pgemm);
    
            ShapedRecipe pcr = new ShapedRecipe(pchest);
            pcr.shape("@ @", "@@@", "@@@");
            pcr.setIngredient('@', pgem.getData());
    
            getServer().addRecipe(pcr);
        }
    
        private void pboots() {
    
            ItemStack pboots = new ItemStack(Material.DIAMOND_BOOTS);
            ItemMeta pbm = pboots.getItemMeta();
            pbm.addEnchant(Enchantment.DURABILITY, 3, true);
            pbm.addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 5, true);
            pbm.setDisplayName(ChatColor.DARK_PURPLE + "Prestigious Boots");
            pboots.setItemMeta(pbm);
    
            ItemStack pgem = new ItemStack(Material.EMERALD);
            ItemMeta pgemm = pgem.getItemMeta();
            pgemm.setDisplayName(ChatColor.AQUA + "Prestigious gem");
            pgemm.addEnchant(Enchantment.DURABILITY, 3, true);
            pgem.setItemMeta(pgemm);
    
            ShapedRecipe pbr = new ShapedRecipe(pboots);
            pbr.shape("", "@ @", "@ @");
            pbr.setIngredient('@', pgem.getData());
    
            getServer().addRecipe(pbr);
        }
    
        private void plegs() {
    
            ItemStack plegs = new ItemStack(Material.DIAMOND_LEGGINGS);
            ItemMeta plm = plegs.getItemMeta();
            plm.addEnchant(Enchantment.DURABILITY, 3, true);
            plm.addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 5, true);
            plm.setDisplayName(ChatColor.DARK_PURPLE + "Prestigious Leggings");
            plegs.setItemMeta(plm);
    
            ItemStack pgem = new ItemStack(Material.EMERALD);
            ItemMeta pgemm = pgem.getItemMeta();
            pgemm.setDisplayName(ChatColor.AQUA + "Prestigious gem");
            pgemm.addEnchant(Enchantment.DURABILITY, 3, true);
            pgem.setItemMeta(pgemm);
    
            ShapedRecipe plr = new ShapedRecipe(plegs);
            plr.shape("@@@", "@ @", "@ @");
            plr.setIngredient('@', pgem.getData());
    
            getServer().addRecipe(plr);
        }
    
        private void ahelm() {
    
    
            ItemStack ahelm = new ItemStack(Material.DIAMOND_HELMET);
            ItemMeta ahm = ahelm.getItemMeta();
            ahm.addEnchant(Enchantment.DURABILITY, 3, true);
            ahm.addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 5, true);
            ahm.setDisplayName(ChatColor.DARK_PURPLE + "Advanced Helm");
            ahelm.setItemMeta(ahm);
    
            ItemStack agem = new ItemStack(Material.EMERALD);
            ItemMeta agemm = agem.getItemMeta();
            agemm.setDisplayName(ChatColor.GREEN + "Advanced gem");
            agemm.addEnchant(Enchantment.DURABILITY, 2, true);
            agem.setItemMeta(agemm);
    
            ShapedRecipe ahr = new ShapedRecipe(ahelm);
            ahr.shape("@@@", "@ @");
            ahr.setIngredient('@', agem.getData());
    
            getServer().addRecipe(ahr);
        }
    
        private void aChest() {
    
    
            ItemStack achest = new ItemStack(Material.DIAMOND_CHESTPLATE);
            ItemMeta acm = achest.getItemMeta();
            acm.addEnchant(Enchantment.DURABILITY, 3, true);
            acm.addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 5, true);
            acm.setDisplayName(ChatColor.DARK_PURPLE + "Advanced Chestpeice");
            achest.setItemMeta(acm);
    
            ItemStack agem = new ItemStack(Material.EMERALD);
            ItemMeta agemm = agem.getItemMeta();
            agemm.setDisplayName(ChatColor.GREEN + "Advanced gem");
            agemm.addEnchant(Enchantment.DURABILITY, 2, true);
            agem.setItemMeta(agemm);
    
            ShapedRecipe acr = new ShapedRecipe(achest);
            acr.shape("@ @", "@@@", "@@@");
            acr.setIngredient('@', agem.getData());
    
            getServer().addRecipe(acr);
        }
    
        private void aboots() {
    
            ItemStack aboots = new ItemStack(Material.DIAMOND_BOOTS);
            ItemMeta abm = aboots.getItemMeta();
            abm.addEnchant(Enchantment.DURABILITY, 3, true);
            abm.addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 5, true);
            abm.setDisplayName(ChatColor.DARK_PURPLE + "Advanced Boots");
            aboots.setItemMeta(abm);
    
            ItemStack agem = new ItemStack(Material.EMERALD);
            ItemMeta agemm = agem.getItemMeta();
            agemm.setDisplayName(ChatColor.GREEN + "Advanced gem");
            agemm.addEnchant(Enchantment.DURABILITY, 2, true);
            agem.setItemMeta(agemm);
    
            ShapedRecipe abr = new ShapedRecipe(aboots);
            abr.shape("", "@ @", "@ @");
            abr.setIngredient('@', agem.getData());
    
            getServer().addRecipe(abr);
        }
    
        private void alegs() {
    
    
            ItemStack alegs = new ItemStack(Material.IRON_LEGGINGS);
            ItemMeta alm = alegs.getItemMeta();
            alm.addEnchant(Enchantment.DURABILITY, 3, true);
            alm.addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 5, true);
            alm.setDisplayName(ChatColor.DARK_PURPLE + "Advanced Leggings");
            alegs.setItemMeta(alm);
    
            ItemStack agem = new ItemStack(Material.EMERALD);
            ItemMeta agemm = agem.getItemMeta();
            agemm.setDisplayName(ChatColor.GREEN + "Advanced gem");
            agemm.addEnchant(Enchantment.DURABILITY, 2, true);
            agem.setItemMeta(agemm);
    
            ShapedRecipe alr = new ShapedRecipe(alegs);
            alr.shape("@@@", "@ @", "@ @");
            alr.setIngredient('@', agem.getData());
    
            getServer().addRecipe(alr);
        }
    
        private void shelm() {
    
    
            ItemStack shelm = new ItemStack(Material.LEATHER_HELMET);
            ItemMeta shm = shelm.getItemMeta();
            shm.addEnchant(Enchantment.DURABILITY, 3, true);
            shm.addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 5, true);
            shm.setDisplayName(ChatColor.DARK_PURPLE + "Simple Helm");
            shelm.setItemMeta(shm);
    
            ItemStack sgem = new ItemStack(Material.EMERALD);
            ItemMeta sgemm = sgem.getItemMeta();
            sgemm.setDisplayName(ChatColor.GREEN + "simple gem");
            sgemm.addEnchant(Enchantment.DURABILITY, 1, true);
            sgem.setItemMeta(sgemm);
    
            ShapedRecipe shr = new ShapedRecipe(shelm);
            shr.shape("@@@", "@ @");
            shr.setIngredient('@', sgem.getData());
    
            getServer().addRecipe(shr);
        }
    
        private void sChest() {
    
    
            ItemStack schest = new ItemStack(Material.LEATHER_CHESTPLATE);
            ItemMeta scm = schest.getItemMeta();
            scm.addEnchant(Enchantment.DURABILITY, 3, true);
            scm.addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 5, true);
            scm.setDisplayName(ChatColor.DARK_PURPLE + "Simple Chestpeice");
            schest.setItemMeta(scm);
    
            ItemStack sgem = new ItemStack(Material.EMERALD);
            ItemMeta sgemm = sgem.getItemMeta();
            sgemm.setDisplayName(ChatColor.GREEN + "simple gem");
            sgemm.addEnchant(Enchantment.DURABILITY, 1, true);
            sgem.setItemMeta(sgemm);
    
            ShapedRecipe scr = new ShapedRecipe(schest);
            scr.shape("@ @", "@@@", "@@@");
            scr.setIngredient('@', sgem.getData());
    
            getServer().addRecipe(scr);
        }
    
        private void sboots() {
    
    
            ItemStack sboots = new ItemStack(Material.LEATHER_BOOTS);
            ItemMeta sbm = sboots.getItemMeta();
            sbm.addEnchant(Enchantment.DURABILITY, 3, true);
            sbm.addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 5, true);
            sbm.setDisplayName(ChatColor.DARK_PURPLE + "Simple Boots");
            sboots.setItemMeta(sbm);
    
            ItemStack sgem = new ItemStack(Material.EMERALD);
            ItemMeta sgemm = sgem.getItemMeta();
            sgemm.setDisplayName(ChatColor.GREEN + "simple gem");
            sgemm.addEnchant(Enchantment.DURABILITY, 1, true);
            sgem.setItemMeta(sgemm);
    
            ShapedRecipe sbr = new ShapedRecipe(sboots);
            sbr.shape("", "@ @", "@ @");
            sbr.setIngredient('@', sgem.getData());
    
            getServer().addRecipe(sbr);
        }
    
        private void slegs() {
    
    
            ItemStack slegs = new ItemStack(Material.LEATHER_LEGGINGS);
            ItemMeta slm = slegs.getItemMeta();
            slm.addEnchant(Enchantment.DURABILITY, 3, true);
            slm.addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 5, true);
            slm.setDisplayName(ChatColor.DARK_PURPLE + "Simple Leggings");
            slegs.setItemMeta(slm);
    
            ItemStack sgem = new ItemStack(Material.EMERALD);
            ItemMeta sgemm = sgem.getItemMeta();
            sgemm.setDisplayName(ChatColor.GREEN + "simple gem");
            sgemm.addEnchant(Enchantment.DURABILITY, 1, true);
            sgem.setItemMeta(sgemm);
    
            ShapedRecipe slr = new ShapedRecipe(slegs);
            slr.shape("@@@", "@ @", "@ @");
            slr.setIngredient('@', sgem.getData());
    
            getServer().addRecipe(slr);
        }
     
  4. Offline

    techboy291

    Add every recipe you create to the server.
     
  5. Offline

    vhbob

    @techboy291 i did

    ok, ive added all the recipies but everyone makes a prestigious item, even if the recipie says something different! heres the code :
    Code:
    private void phelm() {
    
            ItemStack phelm = new ItemStack(Material.DIAMOND_HELMET);
            ItemMeta phm = phelm.getItemMeta();
            phm.addEnchant(Enchantment.DURABILITY, 3, true);
            phm.addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 5, true);
            phm.setDisplayName(ChatColor.DARK_PURPLE + "Prestigious Helm");
            phelm.setItemMeta(phm);
    
            ItemStack pgem = new ItemStack(Material.EMERALD);
            ItemMeta pgemm = pgem.getItemMeta();
            pgemm.setDisplayName(ChatColor.AQUA + "Prestigious gem");
            pgemm.addEnchant(Enchantment.DURABILITY, 3, true);
            pgem.setItemMeta(pgemm);
    
            ShapedRecipe phr = new ShapedRecipe(phelm);
            phr.shape("@@@", "@ @");
            phr.setIngredient('@', pgem.getData());
    
            Bukkit.getServer().addRecipe(phr);
        }
    
        private void pChest() {
    
            ItemStack pchest = new ItemStack(Material.DIAMOND_CHESTPLATE);
            ItemMeta pcm = pchest.getItemMeta();
            pcm.addEnchant(Enchantment.DURABILITY, 3, true);
            pcm.addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 5, true);
            pcm.setDisplayName(ChatColor.DARK_PURPLE + "Prestigious Chestpeice");
            pchest.setItemMeta(pcm);
    
            ItemStack pgem = new ItemStack(Material.EMERALD);
            ItemMeta pgemm = pgem.getItemMeta();
            pgemm.setDisplayName(ChatColor.AQUA + "Prestigious gem");
            pgemm.addEnchant(Enchantment.DURABILITY, 3, true);
            pgem.setItemMeta(pgemm);
    
            ShapedRecipe pcr = new ShapedRecipe(pchest);
            pcr.shape("@ @", "@@@", "@@@");
            pcr.setIngredient('@', pgem.getData());
    
            Bukkit.getServer().addRecipe(pcr);
        }
    
        private void pboots() {
    
            ItemStack pboots = new ItemStack(Material.DIAMOND_BOOTS);
            ItemMeta pbm = pboots.getItemMeta();
            pbm.addEnchant(Enchantment.DURABILITY, 3, true);
            pbm.addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 5, true);
            pbm.setDisplayName(ChatColor.DARK_PURPLE + "Prestigious Boots");
            pboots.setItemMeta(pbm);
    
            ItemStack pgem = new ItemStack(Material.EMERALD);
            ItemMeta pgemm = pgem.getItemMeta();
            pgemm.setDisplayName(ChatColor.AQUA + "Prestigious gem");
            pgemm.addEnchant(Enchantment.DURABILITY, 3, true);
            pgem.setItemMeta(pgemm);
    
            ShapedRecipe pbr = new ShapedRecipe(pboots);
            pbr.shape("   ", "@ @", "@ @");
            pbr.setIngredient('@', pgem.getData());
    
            Bukkit.getServer().addRecipe(pbr);
        }
    
        private void plegs() {
    
            ItemStack plegs = new ItemStack(Material.DIAMOND_LEGGINGS);
            ItemMeta plm = plegs.getItemMeta();
            plm.addEnchant(Enchantment.DURABILITY, 3, true);
            plm.addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 5, true);
            plm.setDisplayName(ChatColor.DARK_PURPLE + "Prestigious Leggings");
            plegs.setItemMeta(plm);
    
            ItemStack pgem = new ItemStack(Material.EMERALD);
            ItemMeta pgemm = pgem.getItemMeta();
            pgemm.setDisplayName(ChatColor.AQUA + "Prestigious gem");
            pgemm.addEnchant(Enchantment.DURABILITY, 3, true);
            pgem.setItemMeta(pgemm);
    
            ShapedRecipe plr = new ShapedRecipe(plegs);
            plr.shape("@@@", "@ @", "@ @");
            plr.setIngredient('@', pgem.getData());
    
            Bukkit.getServer().addRecipe(plr);
        }
    
        private void ahelm() {
    
            ItemStack ahelm = new ItemStack(Material.IRON_HELMET);
            ItemMeta ahm = ahelm.getItemMeta();
            ahm.addEnchant(Enchantment.DURABILITY, 3, true);
            ahm.addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 5, true);
            ahm.setDisplayName(ChatColor.DARK_PURPLE + "Advanced Helm");
            ahelm.setItemMeta(ahm);
    
            ItemStack agem = new ItemStack(Material.EMERALD);
            ItemMeta agemm = agem.getItemMeta();
            agemm.setDisplayName(ChatColor.GREEN + "Advanced gem");
            agemm.addEnchant(Enchantment.DURABILITY, 2, true);
            agem.setItemMeta(agemm);
    
            ShapedRecipe ahr = new ShapedRecipe(ahelm);
            ahr.shape("@@@", "@ @");
            ahr.setIngredient('@', agem.getData());
    
            Bukkit.getServer().addRecipe(ahr);
        }
    
        private void aChest() {
    
            ItemStack achest = new ItemStack(Material.IRON_CHESTPLATE);
            ItemMeta acm = achest.getItemMeta();
            acm.addEnchant(Enchantment.DURABILITY, 3, true);
            acm.addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 5, true);
            acm.setDisplayName(ChatColor.DARK_PURPLE + "Advanced Chestpeice");
            achest.setItemMeta(acm);
    
            ItemStack agem = new ItemStack(Material.EMERALD);
            ItemMeta agemm = agem.getItemMeta();
            agemm.setDisplayName(ChatColor.GREEN + "Advanced gem");
            agemm.addEnchant(Enchantment.DURABILITY, 2, true);
            agem.setItemMeta(agemm);
    
            ShapedRecipe acr = new ShapedRecipe(achest);
            acr.shape("@ @", "@@@", "@@@");
            acr.setIngredient('@', agem.getData());
    
            Bukkit.getServer().addRecipe(acr);
        }
    
        private void aboots() {
    
            ItemStack aboots = new ItemStack(Material.IRON_BOOTS);
            ItemMeta abm = aboots.getItemMeta();
            abm.addEnchant(Enchantment.DURABILITY, 3, true);
            abm.addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 5, true);
            abm.setDisplayName(ChatColor.DARK_PURPLE + "Advanced Boots");
            aboots.setItemMeta(abm);
    
            ItemStack agem = new ItemStack(Material.EMERALD);
            ItemMeta agemm = agem.getItemMeta();
            agemm.setDisplayName(ChatColor.GREEN + "Advanced gem");
            agemm.addEnchant(Enchantment.DURABILITY, 2, true);
            agem.setItemMeta(agemm);
    
            ShapedRecipe abr = new ShapedRecipe(aboots);
            abr.shape("   ", "@ @", "@ @");
            abr.setIngredient('@', agem.getData());
    
            Bukkit.getServer().addRecipe(abr);
        }
    
        private void alegs() {
    
            ItemStack alegs = new ItemStack(Material.IRON_LEGGINGS);
            ItemMeta alm = alegs.getItemMeta();
            alm.addEnchant(Enchantment.DURABILITY, 3, true);
            alm.addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 5, true);
            alm.setDisplayName(ChatColor.DARK_PURPLE + "Advanced Leggings");
            alegs.setItemMeta(alm);
    
            ItemStack agem = new ItemStack(Material.EMERALD);
            ItemMeta agemm = agem.getItemMeta();
            agemm.setDisplayName(ChatColor.GREEN + "Advanced gem");
            agemm.addEnchant(Enchantment.DURABILITY, 2, true);
            agem.setItemMeta(agemm);
    
            ShapedRecipe alr = new ShapedRecipe(alegs);
            alr.shape("@@@", "@ @", "@ @");
            alr.setIngredient('@', agem.getData());
    
            Bukkit.getServer().addRecipe(alr);
        }
    
        private void shelm() {
    
            ItemStack shelm = new ItemStack(Material.LEATHER_HELMET);
            ItemMeta shm = shelm.getItemMeta();
            shm.addEnchant(Enchantment.DURABILITY, 3, true);
            shm.addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 5, true);
            shm.setDisplayName(ChatColor.DARK_PURPLE + "Simple Helm");
            shelm.setItemMeta(shm);
    
            ItemStack sgem = new ItemStack(Material.EMERALD);
            ItemMeta sgemm = sgem.getItemMeta();
            sgemm.setDisplayName(ChatColor.GREEN + "simple gem");
            sgemm.addEnchant(Enchantment.DURABILITY, 1, true);
            sgem.setItemMeta(sgemm);
    
            ShapedRecipe shr = new ShapedRecipe(shelm);
            shr.shape("@@@", "@ @");
            shr.setIngredient('@', sgem.getData());
    
            Bukkit.getServer().addRecipe(shr);
        }
    
        private void sChest() {
    
            ItemStack schest = new ItemStack(Material.LEATHER_CHESTPLATE);
            ItemMeta scm = schest.getItemMeta();
            scm.addEnchant(Enchantment.DURABILITY, 3, true);
            scm.addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 5, true);
            scm.setDisplayName(ChatColor.DARK_PURPLE + "Simple Chestpeice");
            schest.setItemMeta(scm);
    
            ItemStack sgem = new ItemStack(Material.EMERALD);
            ItemMeta sgemm = sgem.getItemMeta();
            sgemm.setDisplayName(ChatColor.GREEN + "simple gem");
            sgemm.addEnchant(Enchantment.DURABILITY, 1, true);
            sgem.setItemMeta(sgemm);
    
            ShapedRecipe scr = new ShapedRecipe(schest);
            scr.shape("@ @", "@@@", "@@@");
            scr.setIngredient('@', sgem.getData());
    
            Bukkit.getServer().addRecipe(scr);
        }
    
        private void sboots() {
    
            ItemStack sboots = new ItemStack(Material.LEATHER_BOOTS);
            ItemMeta sbm = sboots.getItemMeta();
            sbm.addEnchant(Enchantment.DURABILITY, 3, true);
            sbm.addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 5, true);
            sbm.setDisplayName(ChatColor.DARK_PURPLE + "Simple Boots");
            sboots.setItemMeta(sbm);
    
            ItemStack sgem = new ItemStack(Material.EMERALD);
            ItemMeta sgemm = sgem.getItemMeta();
            sgemm.setDisplayName(ChatColor.GREEN + "simple gem");
            sgemm.addEnchant(Enchantment.DURABILITY, 1, true);
            sgem.setItemMeta(sgemm);
    
            ShapedRecipe sbr = new ShapedRecipe(sboots);
            sbr.shape("   ", "@ @", "@ @");
            sbr.setIngredient('@', sgem.getData());
    
            Bukkit.getServer().addRecipe(sbr);
        }
    
        private void slegs() {
    
            ItemStack slegs = new ItemStack(Material.LEATHER_LEGGINGS);
            ItemMeta slm = slegs.getItemMeta();
            slm.addEnchant(Enchantment.DURABILITY, 3, true);
            slm.addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 5, true);
            slm.setDisplayName(ChatColor.DARK_PURPLE + "Simple Leggings");
            slegs.setItemMeta(slm);
    
            ItemStack sgem = new ItemStack(Material.EMERALD);
            ItemMeta sgemm = sgem.getItemMeta();
            sgemm.setDisplayName(ChatColor.GREEN + "simple gem");
            sgemm.addEnchant(Enchantment.DURABILITY, 1, true);
            sgem.setItemMeta(sgemm);
    
            ShapedRecipe slr = new ShapedRecipe(slegs);
            slr.shape("@@@", "@ @", "@ @");
            slr.setIngredient('@', sgem.getData());
    
            Bukkit.getServer().addRecipe(slr);
        }
    EDIT by Timtower: merged posts
     
    Last edited by a moderator: May 19, 2015
  6. Offline

    vhbob

    Bump cause its been 24 hrs
     
Thread Status:
Not open for further replies.

Share This Page