> For the complete documentation index, see [llms.txt](https://m3ii0.gitbook.io/magicalwands/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://m3ii0.gitbook.io/magicalwands/custom-charm-creation/wand-functions.md).

# Wand Functions

Configure what should wand do after dispatch (Insert this into Functions section)

## Send message/messages to sender

```yaml
# Send message to player after dispatch! (Fully supports HEX, Gradient & PAPI)
PlayerMessage:
 - "&aYou've used CharmExample!"
```

## Broadcast message/messages to entire server

```yaml
# Broadcast message (Fully supports HEX, Gradient & PAPI)
Broadcast:
 - "&a%player_name% used CharmExample!"
```

## Message/messages to looking Player (Primary damaged)

```yaml
# Send message to looking target if it is player! (Fully supports HEX, Gradient & PAPI)
# NOTE: Placeholders will be applied for DAMAGED entity
MessageLookingEntity:
 - "&cYou've been attacked!"
```

## Message/messages to all damaged players

```yaml
# Send message to all damaged entities! (Fully supports HEX, Gradient & PAPI)
# NOTE: Placeholders will be applied for each DAMAGED entity
MessageToAllDamaged:
 - "&cYou've been attacked!"
```

## Dispatching command/commands as Player

```yaml
# Dispatch command as player
# NOTE: Without '/'
PlayerCommand:
 - "say hello"
```

## Dispatching command/commands from Console

```yaml
# Dispatch command as Console
# NOTE: Without '/'
ConsoleCommand:
 - "say hello"
```
