# tables

Las mesas son bloques o furniture que al interactuar abren un menú de depósito. Perfectas para integrarse visualmente en el spawn o tienda de tu servidor. Se configuran en la sección `table:` del `config.yml`.

<figure><img src="/files/1dmP43fu1ABgMray6YY7" alt=""><figcaption><p>Mesa de depósito en acción</p></figcaption></figure>

***

## ¿Cómo funciona?

El jugador hace clic (derecho, izquierdo o ambos — configurable) sobre el bloque o furniture registrado como mesa. Si tiene permiso, se abre el menú de depósito enlazado.

{% hint style="info" %}
Cada mesa genera automáticamente el permiso `cubixdeposit.table.<id>`. Los jugadores sin ese permiso no podrán interactuar con esa mesa.
{% endhint %}

***

## Registrar una mesa

Con el bloque o furniture en la mano, ejecuta:

```
/deposit admin addtable <block|furniture>
```

Esto registra automáticamente la entrada en el `config.yml`.

{% tabs %}
{% tab title="CraftEngine" %}

```yaml
table:
  craftengine:
    ce_block:
      block-id: "CubixDeposit:CubixDeposit"
      block-action: RIGHT_CLICK
      open_menu: menu_default
      command-block: []

    ce_furniture:
      furniture-id: "CubixDeposit:CubixDeposit"
      furniture-action: RIGHT_CLICK
      open_menu: menu_default
      command-furniture: []
```

{% endtab %}

{% tab title="Nexo" %}

```yaml
table:
  nexo:
    nexo_block:
      block-id: "CubixDeposit"
      block-action: RIGHT_CLICK
      open_menu: menu_default
      command-block: []

    nexo_furniture:
      furniture-id: "CubixDeposit"
      furniture-action: RIGHT_CLICK
      open_menu: menu_default
      command-furniture: []
```

{% endtab %}

{% tab title="ItemsAdder" %}

```yaml
table:
  itemsadder:
    ia_block:
      block-id: "CubixDeposit:CubixDeposit"
      block-action: RIGHT_CLICK
      open_menu: menu_default
      command-block: []

    ia_furniture:
      furniture-id: "CubixDeposit:CubixDeposit"
      furniture-action: RIGHT_CLICK
      open_menu: menu_default
      command-furniture: []
```

{% endtab %}
{% endtabs %}

|                                       | Opciones                          | Descripción                                                  |
| ------------------------------------- | --------------------------------- | ------------------------------------------------------------ |
| `block-id` / `furniture-id`           | ID del plugin custom              | Identificador del bloque o furniture                         |
| `block-action` / `furniture-action`   | `RIGHT_CLICK` `LEFT_CLICK` `BOTH` | Qué tipo de clic abre el menú                                |
| `open_menu`                           | ID del menú                       | Menú que se abrirá al interactuar                            |
| `command-block` / `command-furniture` | Lista de comandos                 | Se ejecutan al interactuar, solo si el jugador tiene permiso |

***

## Ejecutar comandos al interactuar

Cada mesa puede ejecutar comandos cuando un jugador la usa.

{% hint style="warning" %}
Los comandos en `command-block` o `command-furniture` **solo se ejecutan si el jugador tiene permiso** para abrir el menú. Si no tiene permiso, no ocurre nada.
{% endhint %}

## Cambiar el menú de una mesa existente

```
/deposit admin settable <id> <menu>
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://victorrodasabarca.gitbook.io/cubixdesposit/configuracion/tables.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
