Removing a Crafting Recipe

Discussion in 'Plugin Development' started by bjsnow, May 19, 2013.

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


    How can I remove a crafting recipe such as turning log into wood?

    I have been trying to do this but cant figure out how.
  2. Offline


    I use this to remove the notch apple from a server; its placed in the onEnable

    1. Iterator<Recipe> recipes = getServer().recipeIterator();
    2. Recipe recipe;
    4. while(recipes.hasNext())
    5. {
    6. recipe =;
    7. if(recipe != null && recipe.getResult().getType() == Material.GOLDEN_APPLE && recipe.getResult().getDurability() == 1)
    8. recipes.remove();
    9. }

    Or you could list to craft events and see if the result is wood, if it is cancel.
  3. Offline


    Thank You!
Thread Status:
Not open for further replies.

Share This Page