mirror of
https://github.com/Crazy-Crew/CrazyAuctions.git
synced 2024-11-10 10:10:22 +01:00
Fixed NPE on addLore
This commit is contained in:
parent
c92a130205
commit
1096c3940c
@ -160,7 +160,9 @@ public class Methods {
|
||||
public static ItemStack addLore(ItemStack item, List<String> list) {
|
||||
ArrayList<String> lore = new ArrayList<>();
|
||||
ItemMeta m = item.getItemMeta();
|
||||
if (item.getItemMeta().hasLore()) lore.addAll(item.getItemMeta().getLore());
|
||||
if (item.hasItemMeta() && item.getItemMeta().hasLore()) {
|
||||
lore.addAll(item.getItemMeta().getLore());
|
||||
}
|
||||
for (String i : list)
|
||||
lore.add(color(i));
|
||||
m.setLore(lore);
|
||||
|
Loading…
Reference in New Issue
Block a user