Skip to content

Commit

Permalink
fix: passing a null perm node in VelocityUser
Browse files Browse the repository at this point in the history
  • Loading branch information
WiIIiam278 committed Mar 29, 2024
1 parent d310552 commit 46f7865
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ public int getPlayersOnServer() {

@Override
public boolean hasPermission(@Nullable String permission, boolean allowByDefault) {
if (!player.hasPermission(permission)) {
if (permission == null) {
return allowByDefault;
}
final TriState state = player.getPermissionValue(permission).toAdventureTriState();
if (permission == null || state == TriState.NOT_SET) {
if (state == TriState.NOT_SET) {
return allowByDefault;
}
return state == TriState.TRUE;
Expand Down

0 comments on commit 46f7865

Please sign in to comment.