Added ItemMetaBuilder#hideFlag with varargs

This commit is contained in:
themode 2021-04-04 14:19:51 +02:00
parent 6218d2a78e
commit 992f7feb77
1 changed files with 9 additions and 0 deletions

View File

@ -42,6 +42,15 @@ public abstract class ItemMetaBuilder implements Cloneable {
return this;
}
@Contract("_ -> this")
public @NotNull ItemMetaBuilder hideFlag(@NotNull ItemHideFlag... hideFlags) {
int result = 0;
for (ItemHideFlag hideFlag : hideFlags) {
result |= hideFlag.getBitFieldPart();
}
return hideFlag(result);
}
@Contract("_ -> this")
public @NotNull ItemMetaBuilder displayName(@Nullable Component displayName) {
this.displayName = displayName;