> For the complete documentation index, see [llms.txt](https://francobm.gitbook.io/streamevents/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://francobm.gitbook.io/streamevents/scripting/action.md).

# 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](/streamevents/scripting/action/custom-parameters.md)): 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
