Make world names case insensitive

https://github.com/BentoBoxWorld/Level/issues/59
This commit is contained in:
tastybento 2019-06-20 17:25:20 -07:00
parent 6415efee28
commit 392e22e366

View File

@ -1,7 +1,7 @@
package world.bentobox.level.objects; package world.bentobox.level.objects;
import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.util.TreeMap;
import java.util.UUID; import java.util.UUID;
import org.bukkit.World; import org.bukkit.World;
@ -20,12 +20,12 @@ public class LevelsData implements DataObject {
* Map of world name and island level * Map of world name and island level
*/ */
@Expose @Expose
private Map<String, Long> levels = new HashMap<>(); private Map<String, Long> levels = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
/** /**
* Map of world name to island initial level * Map of world name to island initial level
*/ */
@Expose @Expose
private Map<String, Long> initialLevel = new HashMap<>(); private Map<String, Long> initialLevel = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
public LevelsData() {} // For Bean loading public LevelsData() {} // For Bean loading