Skip to content

Commit

Permalink
Merge branch 'GeyserMC:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Shanwer authored Dec 26, 2023
2 parents 41e64c8 + 592a58a commit 8e7934c
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,11 @@ public GameMode getDefaultGameMode(GeyserSession session) {

@Override
public boolean hasPermission(GeyserSession session, String permission) {
return Objects.requireNonNull(Bukkit.getPlayer(session.getPlayerEntity().getUsername())).hasPermission(permission);
Player player = Bukkit.getPlayer(session.javaUuid());
if (player != null) {
return player.hasPermission(permission);
}
return false;
}

@Override
Expand Down

0 comments on commit 8e7934c

Please sign in to comment.