Lore is non-null

This commit is contained in:
themode 2021-04-04 20:49:21 +02:00
parent 9055ca2380
commit d1d973018e
3 changed files with 4 additions and 5 deletions

View File

@ -353,9 +353,8 @@ public abstract class AbstractInventory implements InventoryClickHandler, DataCo
}
}
@Nullable
@Override
public Data getData() {
public @Nullable Data getData() {
return data;
}

View File

@ -131,12 +131,12 @@ public class ItemStack {
}
@Contract(value = "_, -> new", pure = true)
public @NotNull ItemStack withLore(@Nullable List<@NotNull Component> lore) {
public @NotNull ItemStack withLore(@NotNull List<@NotNull Component> lore) {
return builder().lore(lore).build();
}
@Contract(value = "_, -> new", pure = true)
public @NotNull ItemStack withLore(@NotNull UnaryOperator<@Nullable List<@NotNull Component>> loreUnaryOperator) {
public @NotNull ItemStack withLore(@NotNull UnaryOperator<@NotNull List<@NotNull Component>> loreUnaryOperator) {
return withLore(loreUnaryOperator.apply(getLore()));
}

View File

@ -60,7 +60,7 @@ public class ItemStackBuilder {
}
@Contract(value = "_ -> this")
public @NotNull ItemStackBuilder lore(List<@NotNull Component> lore) {
public @NotNull ItemStackBuilder lore(@NotNull List<@NotNull Component> lore) {
this.metaBuilder.lore(lore);
return this;
}