Skip to content

Commit

Permalink
Fixed reference for levels too
Browse files Browse the repository at this point in the history
  • Loading branch information
tastybento committed Jan 30, 2019
1 parent 7e04871 commit 8becd9c
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ public boolean loadLevel(ChallengeLevel level, boolean overwrite, User user, boo
if (!silent)
{
user.sendMessage("challenges.admin.import.overwriting",
"[object]", level.getFriendlyName());
"[challenge]", level.getFriendlyName());
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
package world.bentobox.challenges.database.object;


import com.google.gson.annotations.Expose;
import java.util.ArrayList;
import java.util.EnumMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;

import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.entity.EntityType;
import org.bukkit.inventory.ItemStack;
import java.util.*;

import com.google.gson.annotations.Expose;

import world.bentobox.bentobox.api.configuration.ConfigComment;
import world.bentobox.bentobox.database.objects.DataObject;
Expand Down Expand Up @@ -50,9 +57,9 @@ public enum ChallengeType
}


// ---------------------------------------------------------------------
// Section: Variables
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Section: Variables
// ---------------------------------------------------------------------

@ConfigComment("")
@ConfigComment("Unique name of the challenge")
Expand Down Expand Up @@ -108,9 +115,9 @@ public enum ChallengeType
@Expose
private String level = "";

// ---------------------------------------------------------------------
// Section: Requirement related
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Section: Requirement related
// ---------------------------------------------------------------------

@ConfigComment("")
@ConfigComment("")
Expand Down Expand Up @@ -184,9 +191,9 @@ public enum ChallengeType
private int searchRadius = 10;


// ---------------------------------------------------------------------
// Section: Rewards
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Section: Rewards
// ---------------------------------------------------------------------

@ConfigComment("")
@ConfigComment("")
Expand Down Expand Up @@ -218,9 +225,9 @@ public enum ChallengeType
private List<String> rewardCommands = new ArrayList<>();


// ---------------------------------------------------------------------
// Section: Repeat Rewards
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Section: Repeat Rewards
// ---------------------------------------------------------------------


@ConfigComment("")
Expand Down Expand Up @@ -261,9 +268,9 @@ public enum ChallengeType
private List<String> repeatRewardCommands = new ArrayList<>();


// ---------------------------------------------------------------------
// Section: Getters
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Section: Getters
// ---------------------------------------------------------------------


/**
Expand All @@ -281,7 +288,7 @@ public String getUniqueId()
*/
public String getFriendlyName()
{
return friendlyName;
return friendlyName.isEmpty() ? uniqueId : friendlyName;
}


Expand Down Expand Up @@ -582,9 +589,9 @@ public List<String> getRepeatRewardCommands()
}


// ---------------------------------------------------------------------
// Section: Setters
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Section: Setters
// ---------------------------------------------------------------------


/**
Expand Down Expand Up @@ -970,9 +977,9 @@ public void setRepeatRewardCommands(List<String> repeatRewardCommands)
}


// ---------------------------------------------------------------------
// Section: Other methods
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Section: Other methods
// ---------------------------------------------------------------------


/**
Expand Down

0 comments on commit 8becd9c

Please sign in to comment.