mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-12-28 20:17:55 +01:00
Make sure world names are lowercase'd
This commit is contained in:
parent
9de44d2605
commit
82e759d708
@ -45,7 +45,7 @@ public class WorldCalculator implements ContextCalculator<Player> {
|
||||
world = plugin.getConfiguration().get(ConfigKeys.WORLD_REWRITES).getOrDefault(world, world);
|
||||
|
||||
if (world != null) {
|
||||
accumulator.add(Maps.immutableEntry(WORLD_KEY, world));
|
||||
accumulator.add(Maps.immutableEntry(WORLD_KEY, world.toLowerCase()));
|
||||
}
|
||||
|
||||
return accumulator;
|
||||
|
@ -41,7 +41,7 @@ public class BackendServerCalculator implements ContextCalculator<ProxiedPlayer>
|
||||
String server = getServer(subject);
|
||||
|
||||
if (server != null) {
|
||||
accumulator.add(Maps.immutableEntry(WORLD_KEY, server));
|
||||
accumulator.add(Maps.immutableEntry(WORLD_KEY, server.toLowerCase()));
|
||||
}
|
||||
|
||||
return accumulator;
|
||||
|
@ -54,7 +54,8 @@ public class ContextManager<T> {
|
||||
}
|
||||
|
||||
public void registerCalculator(ContextCalculator<T> calculator) {
|
||||
calculators.add(calculator);
|
||||
// calculators registered first should have priority (and be checked last.)
|
||||
calculators.add(0, calculator);
|
||||
}
|
||||
|
||||
public int getCalculatorsSize() {
|
||||
|
@ -43,7 +43,7 @@ public class WorldCalculator implements ContextCalculator<Subject> {
|
||||
}
|
||||
|
||||
Player p = ((Player) source);
|
||||
accumulator.add(Context.WORLD_KEY, p.getWorld().getName());
|
||||
accumulator.add(Context.WORLD_KEY, p.getWorld().getName().toLowerCase());
|
||||
return accumulator;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user