Fix compile

This commit is contained in:
Luck 2018-04-09 20:58:52 +01:00
parent cb185e4827
commit f8d34d7f46
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B

View File

@ -48,6 +48,7 @@ import org.bukkit.entity.Player;
import java.util.Arrays;
import java.util.Objects;
import java.util.Optional;
import java.util.UUID;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
@ -337,7 +338,7 @@ public class VaultPermissionHook extends AbstractVaultPermission {
Contexts contextForLookup(User user, String world) {
MutableContextSet context;
Player player = user == null ? null : this.plugin.getBootstrap().getPlayer(user.getUuid());
Player player = Optional.ofNullable(user).flatMap(u -> this.plugin.getBootstrap().getPlayer(u.getUuid())).orElse(null);
if (player != null) {
context = this.plugin.getContextManager().getApplicableContext(player).mutableCopy();
} else {