Make the world-rewrite map case insensitive (#863)

This commit is contained in:
Luck 2018-03-30 11:54:17 +01:00
parent e4e93b1af1
commit 90cce19baf
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B

View File

@ -359,7 +359,13 @@ public class ConfigKeys {
/**
* The world rewrites map
*/
public static final ConfigKey<Map<String, String>> WORLD_REWRITES = MapKey.of("world-rewrite");
public static final ConfigKey<Map<String, String>> 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