[HELP]

Discussion in 'Plugin Development' started by MikeTheCreator69, Jun 25, 2014.

Thread Status:
Not open for further replies.
  1. I am having trouble with adding a recipe,

    package me.MikeTheCreator69;

    import org.bukkit.ChatColor;
    import org.bukkit.Material;
    import org.bukkit.enchantments.Enchantment;
    import org.bukkit.inventory.ItemStack;
    import org.bukkit.inventory.ShapedRecipe;
    import org.bukkit.inventory.meta.ItemMeta;
    import org.bukkit.inventory.meta.LeatherArmorMeta;
    import org.bukkit.plugin.java.JavaPlugin;
    import org.fusesource.jansi.Ansi.Color;

    public class Main extends JavaPlugin {

    public void onEnable() {
    bonehelm();
    }

    public void onDisable() {
    getServer().resetRecipes();
    }

    private void bonehelm() {
    ItemStack bone = new ItemStack(Material.LEATHER_HELMET, 1);
    LeatherArmorMeta meta = (LeatherArmorMeta) bone.getItemMeta();
    meta.setDisplayName(ChatColor.WHITE + "Bone Helmet");
    meta.setLore(ChatColor.RED + "Tier I");
    meta.setColor(Color.WHITE);
    bone.setItemMeta(meta)
    }
     
  2. Offline

    mbaxter ʇıʞʞnq ɐ sɐɥ ı

  3. Offline

    jthort

    MikeTheCreator69 I don't understand what you are trying to do, why are you creating a custom itemstack then just doing nothing with it?

    Take a look at this thread https://forums.bukkit.org/threads/add-crafting-recipe.35374/ which discribes what you need
     
Thread Status:
Not open for further replies.

Share This Page