Slightly change how flag permissions are handled (#3201)

This commit is contained in:
dordsor21
2021-08-14 14:13:01 +01:00
committed by GitHub
parent b841a7c03b
commit da4ae9f4f5
15 changed files with 223 additions and 16 deletions

View File

@ -92,6 +92,16 @@ public class BukkitPermissionHandler implements PermissionHandler {
return player != null && player.hasPermission(permission);
}
@Override
public boolean hasKeyedPermission(
final @Nullable String world,
final @NonNull String stub,
final @NonNull String key
) {
final Player player = this.playerReference.get();
return player != null && (player.hasPermission(stub + "." + key) || player.hasPermission(stub + ".*"));
}
}
}