mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-03 06:28:49 +00:00
fix: handle negative perms with perm restricted warps, close #779
This commit is contained in:
1 parent
72f7b390a1
commit
412e25a1d7
6 files changed
+31
-15
No files matched your search
@@ -20,6 +20,7 @@
|
||||
package net.william278.huskhomes.user;
|
||||
|
||||
import me.lucko.fabric.api.permissions.v0.Permissions;
|
||||
import net.fabricmc.fabric.api.util.TriState;
|
||||
import net.kyori.adventure.audience.Audience;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.network.packet.s2c.common.CustomPayloadS2CPacket;
|
||||
@@ -88,6 +89,11 @@ public class FabricUser extends OnlineUser {
|
||||
return player.getHealth();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPermissionSet(@NotNull String permission) {
|
||||
return Permissions.getPermissionValue(player, permission) != TriState.DEFAULT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasPermission(@NotNull String node) {
|
||||
boolean op = Boolean.TRUE.equals(((FabricHuskHomes) plugin).getPermissions().getOrDefault(node, true));
|
||||
|
||||
Reference in new issue
Block a user