mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-03 15:08:18 +01:00
Fix NPE during first join for LuckPerms contexts (#5364)
This commit is contained in:
parent
8323b47e40
commit
52a4dd2c60
@ -75,6 +75,14 @@ public class LuckPermsHandler extends ModernVaultHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final User user = ess.getUsers().loadUncachedUser(target.getUniqueId());
|
final User user = ess.getUsers().loadUncachedUser(target.getUniqueId());
|
||||||
|
|
||||||
|
// This will occur for first time players during join,
|
||||||
|
// None of our contexts would apply to that kind of person anyway,
|
||||||
|
// lets just skip :O
|
||||||
|
if (user == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for (Calculator calculator : this.calculators) {
|
for (Calculator calculator : this.calculators) {
|
||||||
calculator.function.apply(user).forEach(value -> consumer.accept(calculator.id, value));
|
calculator.function.apply(user).forEach(value -> consumer.accept(calculator.id, value));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user