File tree Expand file tree Collapse file tree
src/main/java/io/github/kiber2009/plugin/contentapi/api/recipe/choice Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ package io .github .kiber2009 .plugin .contentapi .api .recipe .choice ;
2+
3+ import io .github .kiber2009 .plugin .contentapi .api .item .CustomItem ;
4+ import org .bukkit .inventory .ItemStack ;
5+ import org .jetbrains .annotations .Contract ;
6+ import org .jspecify .annotations .NonNull ;
7+ import org .jspecify .annotations .Nullable ;
8+
9+ import java .util .function .Predicate ;
10+
11+ public class CustomItemRecipeChoice implements Predicate <@ Nullable ItemStack > {
12+ private final CustomItem item ;
13+
14+ public CustomItemRecipeChoice (final @ NonNull CustomItem item ) {
15+ this .item = item ;
16+ }
17+
18+ @ Override
19+ @ Contract (value = "null -> false" , pure = true )
20+ public boolean test (final @ Nullable ItemStack stack ) {
21+ return item .match (stack );
22+ }
23+ }
You can’t perform that action at this time.
0 commit comments