mirror of
https://github.com/lucko/LuckPerms.git
synced 2025-09-03 19:32:34 +02:00
Fix ArrayIndexOutOfBoundsException from null environment in BukkitPlayerCalculator
This commit is contained in:
@@ -82,7 +82,10 @@ public class BukkitPlayerCalculator implements ContextCalculator<Player>, Listen
|
|||||||
|
|
||||||
World world = subject.getWorld();
|
World world = subject.getWorld();
|
||||||
if (world != null) {
|
if (world != null) {
|
||||||
consumer.accept(DefaultContextKeys.DIMENSION_TYPE_KEY, DIMENSION_TYPE_NAMER.name(world.getEnvironment()));
|
Environment environment = world.getEnvironment();
|
||||||
|
if (environment != null) {
|
||||||
|
consumer.accept(DefaultContextKeys.DIMENSION_TYPE_KEY, DIMENSION_TYPE_NAMER.name(environment));
|
||||||
|
}
|
||||||
this.plugin.getConfiguration().get(ConfigKeys.WORLD_REWRITES).rewriteAndSubmit(world.getName(), consumer);
|
this.plugin.getConfiguration().get(ConfigKeys.WORLD_REWRITES).rewriteAndSubmit(world.getName(), consumer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user