mirror of
https://github.com/BentoBoxWorld/Challenges.git
synced 2024-11-14 06:36:34 +01:00
Fix null-pointer issue in ChallengeLevel creation.
This commit is contained in:
parent
fa03ea0669
commit
94a54c2156
@ -930,12 +930,13 @@ public class ChallengesManager
|
||||
* @param uniqueID - new ID for challenge level.
|
||||
* @return ChallengeLevel that is currently created.
|
||||
*/
|
||||
public ChallengeLevel createLevel(String uniqueID)
|
||||
public ChallengeLevel createLevel(String uniqueID, World world)
|
||||
{
|
||||
if (!this.containsLevel(uniqueID))
|
||||
{
|
||||
ChallengeLevel level = new ChallengeLevel();
|
||||
level.setUniqueId(uniqueID);
|
||||
level.setWorld(world.getName());
|
||||
|
||||
this.saveLevel(level);
|
||||
this.loadLevel(level);
|
||||
|
@ -244,7 +244,7 @@ public class AdminGUI extends CommonGUI
|
||||
new EditLevelGUI(this.addon,
|
||||
this.world,
|
||||
this.user,
|
||||
this.addon.getChallengesManager().createLevel(newName),
|
||||
this.addon.getChallengesManager().createLevel(newName, this.world),
|
||||
this.topLabel,
|
||||
this.permissionPrefix,
|
||||
this).build();
|
||||
|
Loading…
Reference in New Issue
Block a user