# Actions

These actions are being used to define what is gonna happen when a reward is won!

**Placeholders:**

* %reward-name% - name of the reward
* %chance% - chance of the item
* %rarity-name% - name of the rarity
* %rarity-id% - id of the rarity
* %item\_type\_image\_url% - url to png file of the reward item material
* %reward-var:\<id>% - reward variable
* %random-amount% - the value of rolled random amount
* %player% - player username
* And all PAPI placeholders

### Discord Embed

```yaml
actions:
  - type: "discord-webhook"
    url: "Webhook URL"
    content: "Message Content"
    username: "Actions Webhook"
    avatar-url: "Icon Url"
    tts: false
    embeds:
      - title: "Embed 1"
        description: "This is Embed 1 description"
        url: "Title URL"
        author: 
          name: "AquaticCrates"
          url: "Author URL"
          icon-url: "Author Icon URL"
        footer:
          text: "This is footer text"
          icon-url: "Footer Icon URL"
        color:
          red: 255
          green: 255
          blue: 255
        image: "Embed Image URL"
        thumbnail: "Thumbnail Image URL"
        
```

### Actionbar

```yaml
actions:
  - type: "actionbar"
    message: "Your actionbar message"
```

### Bossbar

```yaml
actions:
  - type: "bossbar"
    message: "Bossbar message"
    progress: 1.0
    color: WHITE
    style: PROGRESS
    duration: 60 # Ticks
```

Shows a bossbar for X amount of ticks

Colors:

* PINK
* BLUE
* RED
* GREEN
* YELLOW
* PURPLE
* WHITE

Styles:

* PROGRESS
* NOTCHED\_6
* NOTCHED\_10
* NOTCHED\_12
* NOTCHED\_20

### Broadcast

```yaml
actions:
  - type: "broadcast"
    message: "The broadcast message"
```

### Command

```yaml
actions:
  - type: "command"
    command: "say hello %player%"
```

### Give Item

```yaml
actions:
  - type: "giveitem"
    item:
      material: STONE
      display-name: "<red>Special Stone"
      amount: 1
```

Check out more item settings in the [Item Settings](https://mrlarkyy.gitbook.io/aquaticcrates-v3/configuring/item-settings) section!

### Message

```yaml
actions:
  - type: "message"
    message: "The broadcast message"
```

### Sound

```yaml
actions:
  - type: "sound"
    sound: "minecraft:ambient.basalt_deltas.additions"
    volume: 1.0
    pitch: 1.0
```

### Title

```yaml
actions:
  - type: "title"
    title: "Your title"
    subtitle: "Your subtitle"
    fade-in: 0
    stay: 100
    fade-out: 0
```
