mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-04 14:12:20 -07:00
[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:
@@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user