[Bleeding] Add ways to retrieve and delete crafting recipes and fixed some issues with the existing recipe API.
- New recipe iterator which enables deleting specific recipes - Functions to delete all recipes or revert to vanilla recipe set - Fixed the recipes API; you should now be able to define recipes that take brewed potions! - Fetch all recipes that result in a specific item By: Celtic Minstrel <celtic.minstrel.ca@some.place>
This commit is contained in:
parent
8bc2cf4969
commit
07ccb2a000
6 changed files with 226 additions and 81 deletions
|
@ -1,6 +1,7 @@
|
|||
package org.bukkit;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
@ -11,6 +12,7 @@ import org.bukkit.command.CommandSender;
|
|||
import org.bukkit.command.ConsoleCommandSender;
|
||||
import org.bukkit.command.PluginCommand;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.Recipe;
|
||||
import org.bukkit.map.MapView;
|
||||
import org.bukkit.plugin.PluginManager;
|
||||
|
@ -192,6 +194,22 @@ public final class Bukkit {
|
|||
return server.addRecipe(recipe);
|
||||
}
|
||||
|
||||
public List<Recipe> getRecipesFor(ItemStack result) {
|
||||
return server.getRecipesFor(result);
|
||||
}
|
||||
|
||||
public Iterator<Recipe> recipeIterator() {
|
||||
return server.recipeIterator();
|
||||
}
|
||||
|
||||
public void clearRecipes() {
|
||||
server.clearRecipes();
|
||||
}
|
||||
|
||||
public void resetRecipes() {
|
||||
server.resetRecipes();
|
||||
}
|
||||
|
||||
public static Map<String, String[]> getCommandAliases() {
|
||||
return server.getCommandAliases();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue