# Action

An action is what determines what will be done when executed by an event.

An action has 3 properties

```yaml
actions:
  action_test:
    action_type: CHAT_MESSAGE
    message: '&9%user% &csend a &6%comment%'
    entity: WOLF
    sound: 'minecraft:entity.player.levelup'
    call: 'callOtherFunction'
    commands:
      - 'tp %player% 0 100 0'
    material: STONE
    custom_params: ...
```

action\_type ([T](#types)): This is the type you want to perform when executing this action

message: This property only works on the CHAT\_MESSAGE type and defines the message that will be sent when the action is executed.

entity: This property only works on the SPAWN\_ENTITY type and defines the type of entity that will spawn when the action is executed. ([Entity list](https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/entity/EntityType.html))

commands: This property only works in the EXECUTE\_COMMAND type and defines the commands when executing the action

material: This property only works on the SPAWN\_BLOCK type and defines the material of the block that will spawn. ([List of materials](https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Material.html))

sound: This property only works with the PLAY\_SOUND type and defines the sound you will hear when the action is executed.

call: This property is used to tell the action that it will be linked to another plugin that has registered that call.

custom\_params ([C\_P](https://francobm.gitbook.io/streamevents/scripting/action/custom-parameters)): The custom parameters are a bit more extensive but to sum it up they are variables with which you can further modify each of your actions.

### TYPES

* EXECUTE\_COMMAND
* SPAWN\_ENTITY
* SPAWN\_BLOCK
* CHAT\_MESSAGE
* PLAY\_SOUND
* CUSTOM


---

# 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://francobm.gitbook.io/streamevents/scripting/action.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.
