Allow null item when creating a line in the API

This commit is contained in:
filoghost 2021-12-25 12:18:41 +01:00
parent aade3ddbfe
commit ae7591f952
2 changed files with 2 additions and 3 deletions

View File

@ -35,7 +35,7 @@ public interface HologramLines {
* @return the created line
* @since 1
*/
@NotNull ItemHologramLine appendItem(@NotNull ItemStack itemStack);
@NotNull ItemHologramLine appendItem(@Nullable ItemStack itemStack);
/**
* Inserts a new text line before the given index.

View File

@ -34,8 +34,7 @@ class APIHologramLines extends BaseHologramLines<APIHologramLine> implements Hol
}
@Override
public @NotNull ItemHologramLine appendItem(@NotNull ItemStack itemStack) {
Preconditions.notNull(itemStack, "itemStack");
public @NotNull ItemHologramLine appendItem(@Nullable ItemStack itemStack) {
checkNotDeleted();
APIItemHologramLine line = new APIItemHologramLine(hologram, itemStack);