# Customize Block Commands

1. Run the command `/regen menu`.
2. Select "Edit Menu."
3. Select "Region / Global."
4. Select "Block Menu."
5. Select the block you want to edit.
6. Click on "Add Commands" (Command Block icon).

<figure><img src="/files/6elX2JfhLQWpuSkGEwLA" alt=""><figcaption></figcaption></figure>

* **Runner:** Specify whether the command should be run by the console or the player.
* **Command:** Specify the command to be executed.
* **Chance:** Set a chance between 0.001 to 0.999 for the command to run.

For example:

<pre><code><strong>Console ; say hi ; 0.5
</strong></code></pre>

```
Player ; spawn ; 0.1
```

## Command Chaining

#### Example of Command Chaining

To use command chaining, format the command sequence as shown below:

```plaintext
Console ; teleport %player% 100 64 200 > Player ; give %player% diamond_sword ; 0.25
```

In this example, if the teleport command is successful, there is a 25% chance that the player will receive a diamond sword.

{% hint style="warning" %}
Supported Placeholders:\
%player% : Replaces with player name \
%x% : Replaces with block's x co-ordinate\
%y% : Replaces with block's y co-ordinate\
%z% : Replaces with block's z co-ordinate\
%world% : Replaces with block's world
{% endhint %}


---

# 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://wiki.hmmbo.com/fundamentals/gui-help/edit-menu/customize-block-commands.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.
