From d3105523bb529610a9b8e7c5bdd0676df674cb97 Mon Sep 17 00:00:00 2001 From: William Date: Fri, 29 Mar 2024 23:30:13 +0000 Subject: [PATCH] fix: LuckPerms permission check error --- gradle.properties | 2 +- .../main/java/net/william278/huskchat/user/VelocityUser.java | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index b908de8..74a6213 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,7 @@ org.gradle.parallel=true org.gradle.daemon=true javaVersion=17 -plugin_version=3.0 +plugin_version=3.0.1 plugin_archive=huskchat plugin_description=A simple & customizable no-frills Minecraft chat system 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 86d1c15..2a007db 100644 --- a/velocity/src/main/java/net/william278/huskchat/user/VelocityUser.java +++ b/velocity/src/main/java/net/william278/huskchat/user/VelocityUser.java @@ -68,6 +68,9 @@ public int getPlayersOnServer() { @Override public boolean hasPermission(@Nullable String permission, boolean allowByDefault) { + if (!player.hasPermission(permission)) { + return allowByDefault; + } final TriState state = player.getPermissionValue(permission).toAdventureTriState(); if (permission == null || state == TriState.NOT_SET) { return allowByDefault;