public class RecipeManager extends Manager<RecipeManager>
| Modifier and Type | Class and Description |
|---|---|
class |
RecipeManager.Init |
Manager.ManagerEvent<S>| Constructor and Description |
|---|
RecipeManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
addRecipe(Recipe recipe)
Adds a recipe.
|
<T extends Recipe> |
getRecipes(java.lang.Class<T> type)
Returns an unmodifiable set view of all the recipes for the type.
|
void |
init()
Initializes the manager event
|
void |
removeRecipe(Recipe recipe)
Removes a recipe.
|
<T extends Recipe> |
whenRecipeAdded(java.lang.Class<T> type,
EventListener<RecipeEvent.Add<T>> listener) |
<T extends Recipe> |
whenRecipeRemoved(java.lang.Class<T> type,
EventListener<RecipeEvent.Remove<T>> listener) |
public void addRecipe(Recipe recipe)
recipe - The recipe to add.public void removeRecipe(Recipe recipe)
recipe - The recipe to remove.public <T extends Recipe> java.util.Set<T> getRecipes(java.lang.Class<T> type)
To modify the underlying recipe list, you have to use
addRecipe(Recipe) and removeRecipe(Recipe) instead.
T - The recipe typetype - The recipe classpublic <T extends Recipe> EventListenerHandle<RecipeEvent.Add<T>> whenRecipeAdded(java.lang.Class<T> type, EventListener<RecipeEvent.Add<T>> listener)
public <T extends Recipe> EventListenerHandle<RecipeEvent.Remove<T>> whenRecipeRemoved(java.lang.Class<T> type, EventListener<RecipeEvent.Remove<T>> listener)
public void init()
Managerinit in class Manager<RecipeManager>