#714: Added getRecipe() method to retrieve a Recipe by it's NamespacedKey
Dieser Commit ist enthalten in:
Ursprung
6b95d595cf
Commit
8b831a9652
@ -1208,6 +1208,13 @@ public final class CraftServer implements Server {
|
||||
return results;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Recipe getRecipe(NamespacedKey recipeKey) {
|
||||
Preconditions.checkArgument(recipeKey != null, "recipeKey == null");
|
||||
|
||||
return getServer().getCraftingManager().a(CraftNamespacedKey.toMinecraft(recipeKey)).map(IRecipe::toBukkitRecipe).orElse(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator<Recipe> recipeIterator() {
|
||||
return new RecipeIterator();
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren