mirror of
https://github.com/BentoBoxWorld/Challenges.git
synced 2024-11-01 00:11:37 +01:00
Fix null-pointer crash when loading invalid challenge level.
This commit is contained in:
parent
94a54c2156
commit
55578ab88c
@ -214,8 +214,15 @@ public class ChallengesManager
|
||||
{
|
||||
if (!this.isValidLevel(level))
|
||||
{
|
||||
user.sendMessage("challenges.admin.import.error",
|
||||
if (user != null)
|
||||
{
|
||||
user.sendMessage("challenges.admin.import.error",
|
||||
"[object]", level.getFriendlyName());
|
||||
}
|
||||
else
|
||||
{
|
||||
this.addon.logError("Challenge Level '" + level.getUniqueId() + "' is not valid and skipped");
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user