Adds protection around nulls. (#361)

This commit is contained in:
tastybento 2024-10-23 21:24:41 -07:00 committed by GitHub
parent 17dc22ed66
commit 12f3933ce3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View File

@ -63,6 +63,7 @@ public class ChallengesAdminCommand extends CompositeCommand
return true; return true;
} }
this.showHelp(this, user);
return false; return false;
} }
} }

View File

@ -153,6 +153,9 @@ public class ChallengeLevel implements DataObject, Comparable<ChallengeLevel>
*/ */
public ItemStack getIcon() public ItemStack getIcon()
{ {
if (icon == null) {
icon = new ItemStack(Material.PAPER);
}
return icon.clone(); return icon.clone();
} }