mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2026-11-14 01:24:05 +00:00
Fabric Permission API v1 replace / with . (#4310)
This commit is contained in:
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -70,7 +70,7 @@ public class FabricPermissionsApiV1Listener {
|
||||
|
||||
if (codec == Codec.BOOL) {
|
||||
// permission check
|
||||
String permissionString = node.key().getNamespace() + '.' + node.key().getPath();
|
||||
String permissionString = node.key().getNamespace() + '.' + node.key().getPath().replace('/', '.');
|
||||
Boolean permissionValue = permissionCheck(ctx, permissionString);
|
||||
return node.cast(permissionValue);
|
||||
}
|
||||
|
||||
+1
-1
@@ -64,7 +64,7 @@ public class FabricPermissionsListener {
|
||||
public boolean hasPermission(@NonNull Permission permission) {
|
||||
if (permission instanceof Permission.Atom) {
|
||||
Identifier permissionId = ((Permission.Atom) permission).id();
|
||||
String permissionString = permissionId.getNamespace() + '.' + permissionId.getPath();
|
||||
String permissionString = permissionId.getNamespace() + '.' + permissionId.getPath().replace('/', '.');
|
||||
|
||||
Tristate result = ((MixinUser) this.player).luckperms$hasPermission(permissionString);
|
||||
if (result != Tristate.UNDEFINED) {
|
||||
|
||||
Reference in new issue
Block a user