# messagehistory

Similar to core protect, it lets you see the player's message history.

{% code title="Example" overflow="wrap" %}

```yaml
message_history:
  type: "messagehistory"
  enabled: true
  name: "messagehistory"
  not_found: "{error_colour}Player could not be found."
  # Amount of sections on a page.
  page_size: 8
  # %page% : The number of the page the player is currently viewing.
  # %page_amount% : The amount of pages they can see.
  header: '&8&m&l------&r &a&lMessages &7[&f%page%&7/&f%page_amount%&7] &8&m&l------'
  # %message% : The content of the message.
  # %from% : The player the message was from.
  # %to% :  player the message was sent to.
  # %date% : The date the message was sent.
  section: '&7%date% &f%from% &7: &e%message%'
  # %page% : The number of the page the player is currently viewing.
  # %page_amount% : The amount of pages they can see.
  footer: '&8&m&l---------------------'
```

{% endcode %}

`/[name] [query]`

{% tabs %}
{% tab title="Example 1" %}

```
/messagehistory p:Smudge t:10d i:"Hi!" e:"Bye","Byebye"
```

{% endtab %}

{% tab title="Example 2" %}

```
/messagehistory p:Smudge,Smudge2 t:1d-2d
```

{% endtab %}
{% endtabs %}

**Query Types**\
`p:` Is used to include a player or players.\
`t:` Is used to specify a time period.\
`i:` is used to only show messages that include the strings.\
`e:` is used to remove messages that include this string.
