Fixed reference for levels too

This commit is contained in:
tastybento 2019-01-30 08:03:23 -08:00
parent 7e0487113d
commit 8becd9c08b
2 changed files with 32 additions and 25 deletions

View File

@ -237,7 +237,7 @@ public class ChallengesManager
if (!silent)
{
user.sendMessage("challenges.admin.import.overwriting",
"[object]", level.getFriendlyName());
"[challenge]", level.getFriendlyName());
}
}
}

View File

@ -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;
@ -281,7 +288,7 @@ public class Challenge implements DataObject
*/
public String getFriendlyName()
{
return friendlyName;
return friendlyName.isEmpty() ? uniqueId : friendlyName;
}