Skip to content

Commit 12f3933

Browse files
authored
Adds protection around nulls. (#361)
1 parent 17dc22e commit 12f3933

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/main/java/world/bentobox/challenges/commands/admin/ChallengesAdminCommand.java

+1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ public boolean execute(User user, String label, List<String> args)
6363

6464
return true;
6565
}
66+
this.showHelp(this, user);
6667
return false;
6768
}
6869
}

src/main/java/world/bentobox/challenges/database/object/ChallengeLevel.java

+3
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,9 @@ public String getFriendlyName()
153153
*/
154154
public ItemStack getIcon()
155155
{
156+
if (icon == null) {
157+
icon = new ItemStack(Material.PAPER);
158+
}
156159
return icon.clone();
157160
}
158161

0 commit comments

Comments
 (0)