Skip to content

Commit

Permalink
Add null check for ItemCreator
Browse files Browse the repository at this point in the history
  • Loading branch information
CyberedCake committed Jun 18, 2024
1 parent 704d031 commit a9006de
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 24 deletions.
24 changes: 0 additions & 24 deletions spigot/src/main/java/net/cybercake/cyberapi/spigot/items/GUI.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ public ItemBuilder lore(List<String> lore) {
* @since 90
*/
public ItemBuilder addLore(String line) {
if (line == null) return this;
return addLore(Collections.singletonList(line)); // string is formatted later
}

Expand All @@ -379,6 +380,7 @@ public ItemBuilder addLore(String line) {
* @return 90
*/
public ItemBuilder addLore(String... lines) {
if (lines == null) return this;
return addLore(Arrays.asList(lines)); // strings are formatted later
}

Expand All @@ -387,6 +389,8 @@ public ItemBuilder addLore(String... lines) {
* @return 90
*/
public ItemBuilder addLore(List<String> lines) {
if (lines == null) return this;

List<String> lore = this.meta.getLore();

if (lore == null)
Expand Down

0 comments on commit a9006de

Please sign in to comment.