-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathIngredient.java
More file actions
45 lines (37 loc) · 994 Bytes
/
Ingredient.java
File metadata and controls
45 lines (37 loc) · 994 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package fr.traqueur.recipes.api.domains;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.RecipeChoice;
/**
* Base class for ingredients.
*/
public abstract class Ingredient {
/**
* The sign of the ingredient.
*/
private final Character sign;
/**
* Constructor.
* @param sign The sign of the ingredient.
*/
public Ingredient(Character sign) {
this.sign = sign;
}
/**
* Get the sign of the ingredient.
* @return The sign of the ingredient.
*/
public Character sign() {
return this.sign;
}
/**
* Check if the item is similar to the ingredient.
* @param item The item to check.
* @return true if the item is similar to the ingredient, false otherwise.
*/
public abstract boolean isSimilar(ItemStack item);
/**
* Get the choice of the ingredient.
* @return The choice of the ingredient.
*/
public abstract RecipeChoice choice();
}