def send_click(self, click):
        """
        Sends a click to the server if the previous click has been confirmed.

        Args:
            click (BaseClick): The click to send.

        Returns:
            the click's action ID if the click could be sent,
            None if the previous click has not been received and confirmed yet.
        """
        # only send if previous click got confirmed
        if self.last_click:
            return None
        inv = self.inventory
        packet = click.get_packet(inv)
        try:
            craft_result_slot = inv.window.craft_result_slot.slot_nr
            if packet['slot'] == craft_result_slot:
                # send wrong click to update inventory after crafting
                packet['clicked_item'] = {'id': -1}
        except __HOLE__:
            pass  # not crafting
        self.action_id += 1
        packet['window_id'] = inv.window.window_id
        packet['action'] = self.action_id
        self.last_click = click
        self.net.push_packet('PLAY>Click Window', packet)
        return self.action_id
dataset/ETHPy150Open SpockBotMC/SpockBot/spockbot/plugins/helpers/inventory.py/InventoryPlugin.send_click