Skip to content

Commit 3c7b7f1

Browse files
author
TheProgramSrc
committed
SimpleItem#getDisplayName and SimpleItem#getLore won't return null to avoid errors
1 parent 4f0bf61 commit 3c7b7f1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/xyz/theprogramsrc/supercoreapi/spigot/items/SimpleItem.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ public SimpleItem setMaterial(XMaterial material){
380380
public String getDisplayName(){
381381
ItemMeta meta = this.item.getItemMeta();
382382
if(meta == null)
383-
return null;
383+
return "null";
384384
return Utils.ct(meta.getDisplayName());
385385
}
386386

@@ -391,8 +391,8 @@ public String getDisplayName(){
391391
public LinkedList<String> getLore(){
392392
ItemMeta meta = this.item.getItemMeta();
393393
if(meta == null)
394-
return null;
395-
return meta.getLore() != null ? new LinkedList<>(this.utils.color(meta.getLore())) : null;
394+
return new LinkedList<>();
395+
return meta.getLore() != null ? new LinkedList<>(this.utils.color(meta.getLore())) : new LinkedList<>();
396396
}
397397

398398
/**

0 commit comments

Comments
 (0)