Skip to content

Commit 890a067

Browse files
committed
default method for ItemModifier
1 parent 0f3725b commit 890a067

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

core/src/main/java/io/github/projectunified/craftitem/core/ItemModifier.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,13 @@ public interface ItemModifier {
2727
* @param translator a function to translate string values (e.g., for variable substitution)
2828
*/
2929
void modify(Item item, UnaryOperator<String> translator);
30+
31+
/**
32+
* Applies modifications to the given item.
33+
*
34+
* @param item the item to modify
35+
*/
36+
default void modify(Item item) {
37+
modify(item, UnaryOperator.identity());
38+
}
3039
}

0 commit comments

Comments
 (0)