From 46f7865631f0b2e90d3e710214e20496911fc31d Mon Sep 17 00:00:00 2001 From: William Date: Fri, 29 Mar 2024 23:34:05 +0000 Subject: [PATCH] fix: passing a null perm node in VelocityUser --- .../main/java/net/william278/huskchat/user/VelocityUser.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/velocity/src/main/java/net/william278/huskchat/user/VelocityUser.java b/velocity/src/main/java/net/william278/huskchat/user/VelocityUser.java index 2a007db..83cd80c 100644 --- a/velocity/src/main/java/net/william278/huskchat/user/VelocityUser.java +++ b/velocity/src/main/java/net/william278/huskchat/user/VelocityUser.java @@ -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;