Revert "Fixed null lore bug with AbstractItemStackBuilder"

This reverts commit a69f9f6e11.
This commit is contained in:
Auxilor
2022-10-01 13:02:21 +01:00
parent a69f9f6e11
commit 1a3d035f78
2 changed files with 12 additions and 9 deletions

View File

@@ -14,6 +14,7 @@ import org.bukkit.persistence.PersistentDataType;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Supplier;
@@ -113,7 +114,17 @@ public abstract class AbstractItemStackBuilder<T extends ItemMeta, U extends Abs
@Override
public U addLoreLine(@NotNull final String line) {
return addLoreLines(List.of(line));
base.setItemMeta(meta);
FastItemStack fis = FastItemStack.wrap(base);
List<String> lore = fis.getLore();
lore.add(StringUtils.format(line));
fis.setLore(lore);
meta = (T) base.getItemMeta();
return (U) this;
}
@Override