From 507cefd128e29a176e5c90f6039e0aea36dc1eed Mon Sep 17 00:00:00 2001 From: tastybento Date: Tue, 21 Jul 2020 07:49:13 -0700 Subject: [PATCH] Additional lower case world naming. https://github.com/BentoBoxWorld/Level/issues/172 --- .../java/world/bentobox/level/objects/LevelsData.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/world/bentobox/level/objects/LevelsData.java b/src/main/java/world/bentobox/level/objects/LevelsData.java index db86d0e..b76643b 100644 --- a/src/main/java/world/bentobox/level/objects/LevelsData.java +++ b/src/main/java/world/bentobox/level/objects/LevelsData.java @@ -226,7 +226,7 @@ public class LevelsData implements DataObject { Map count = new EnumMap<>(Material.class); uwCount.forEach(m -> count.put(m, uwCount.count(m))); - this.uwCount.put(world.getName(), count); + this.uwCount.put(world.getName().toLowerCase(Locale.ENGLISH), count); } /** @@ -237,7 +237,7 @@ public class LevelsData implements DataObject { Map count = new EnumMap<>(Material.class); mdCount.forEach(m -> count.put(m, mdCount.count(m))); - this.mdCount.put(world.getName(), count); + this.mdCount.put(world.getName().toLowerCase(Locale.ENGLISH), count); } @@ -247,7 +247,7 @@ public class LevelsData implements DataObject { */ public Map getUwCount(World world) { initialize(); - return uwCount.getOrDefault(world.getName(), Collections.emptyMap()); + return uwCount.getOrDefault(world.getName().toLowerCase(Locale.ENGLISH), Collections.emptyMap()); } /** @@ -256,7 +256,7 @@ public class LevelsData implements DataObject { */ public Map getMdCount(World world) { initialize(); - return mdCount.getOrDefault(world.getName(), Collections.emptyMap()); + return mdCount.getOrDefault(world.getName().toLowerCase(Locale.ENGLISH), Collections.emptyMap()); }