mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-27 21:29:47 +01:00
Fix ArrayIndexOutOfBoundsException from null environment in BukkitPlayerCalculator
This commit is contained in:
parent
7d7d40b087
commit
5bfbf26e2f
@ -82,7 +82,10 @@ public class BukkitPlayerCalculator implements ContextCalculator<Player>, Listen
|
||||
|
||||
World world = subject.getWorld();
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user