class HasPermissionChecker implements DebugSection {

    @Override
    public void execute(CommandSender sender, List<String> arguments) {
        sender.sendMessage(ChatColor.BLUE + "AuthMe permission check");
        if (arguments.size() < 2) {
            sender.sendMessage("Check if a player has permission:");
            sender.sendMessage("Example: /authme debug perm bobby my.perm.node");
            sender.sendMessage("Permission system type used: " + permissionsManager.getPermissionSystem());
            return;
        }

        final String playerName = arguments.get(0);
        final String permissionNode = arguments.get(1);

        Player player = bukkitService.getPlayerExact(playerName);
        if (player == null) {
            OfflinePlayer offlinePlayer = Bukkit.getOfflinePlayer(playerName);
            if (offlinePlayer == null) {
                sender.sendMessage(ChatColor.DARK_RED + "Player '" + playerName + "' does not exist");
            } else {
                sender.sendMessage("Player '" + playerName + "' not online; checking with offline player");
                performPermissionCheck(offlinePlayer, permissionNode, permissionsManager::hasPermissionOffline, sender);
            }
        } else {
            performPermissionCheck(player, permissionNode, permissionsManager::hasPermission, sender);
        }
    }

}