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