From 90cce19baf58e33a5456d623169de606198375d0 Mon Sep 17 00:00:00 2001 From: Luck Date: Fri, 30 Mar 2018 11:54:17 +0100 Subject: [PATCH] Make the world-rewrite map case insensitive (#863) --- .../java/me/lucko/luckperms/common/config/ConfigKeys.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/common/src/main/java/me/lucko/luckperms/common/config/ConfigKeys.java b/common/src/main/java/me/lucko/luckperms/common/config/ConfigKeys.java index cbe7ef31b..42099f6bc 100644 --- a/common/src/main/java/me/lucko/luckperms/common/config/ConfigKeys.java +++ b/common/src/main/java/me/lucko/luckperms/common/config/ConfigKeys.java @@ -359,7 +359,13 @@ public class ConfigKeys { /** * The world rewrites map */ - public static final ConfigKey> WORLD_REWRITES = MapKey.of("world-rewrite"); + public static final ConfigKey> WORLD_REWRITES = AbstractKey.of(c -> { + return c.getMap("world-rewrite", ImmutableMap.of()).entrySet().stream() + .collect(ImmutableCollectors.toMap( + e -> e.getKey().toLowerCase(), + e -> e.getValue().toLowerCase() + )); + }); /** * The group name rewrites map