# Layers

<mark style="color:purple;">**Background:**</mark>\
Background is a texture drawn beneath all other layers. When there is more than one background layer, they are drawn in order.

```yaml
  background:
    type: "background"
    texture: "examples/forest.png"
```

<mark style="color:purple;">**Button:**</mark>\
Button is the layer responsible for the location, selection texture, and actions upon pressing.

```yaml
  night:
    type: "button"
    texture_outline: "examples/button_outline.png"
    position: [5, 12]
    actions:
      requirements:
        type: "has_permission"
        permission: "mapmenu.night.permission"
        deny_actions:
          - "[message] &cYou do not have permission to do this action"
      actions:
        - "[console] time set 16000"
```

<mark style="color:purple;">**Text:**</mark>\
Text is the layer that allows writing on a single line or with multiple lines using Minecraft's default font and its unique size.

```yaml
  title:
    type: "text"
    text: "&a.----[Player Stats]----."
    position: "[3, 2]"
    
  stats:
    type: "text"
    text:
      - "&ePlayTime: &f%statistic_time_played%"
      - "&#88e7e5Mined diamonds: &f%statistic_mine_block:diamond_ore%"
      - "&#d988e7Jumps: &f%statistic_jump%"
      - "&cDeaths: &f%statistic_deaths%"
      - "&4Kills: &f%statistic_player_kills%"
      - ""
      - "          &0aFirst join:"
      - "     &f%player_first_join_date%"
```

<mark style="color:purple;">**URL:**</mark>\
URL is the layer that allows you to use URLs to draw textures in the menu without having to download anything.

```yaml
#In this example, use this placeholder to obtain the URL of the player's skin
# and then draw it.
  head:
    type: "url"
    position: "[120, 120]"
    offset: [8, 8, 8, 8]
    texture: "%mapmenu_player_skinurl%"
```

<mark style="color:purple;">**Chibi:**</mark>\
Chibi is a layer that allows drawing a miniature version of your skin. You can achieve this by providing a URL, an image, or using a placeholder to represent your skin.

```yaml
  miniskin:
    type: "chibi"
    position: "[2, 12]"
    texture: "%mapmenu_player_skinurl%"
```

<mark style="color:purple;">**AnimatedText:**</mark>\
AnimatedText allows you to write multiple lines of text in the menu that will animate among themselves. The update\_interval parameter affects its speed.

```yaml
  animated_hello:
    type: "AnimatedText"
    position: "[2, 12]"
    frames:
      - "H"
      - "He"
      - "Hel"
      - "Hell"
      - "Hello"
      - "Hello! "
      - "Hello! :"
      - "Hello! :D"
```

<mark style="color:purple;">**CustomText:**</mark>\
CustomText is a layer that allows you to write on the map, but you can change the size and choose from the fonts already available or download new ones.\
The downloaded fonts should be placed in the folder: 'plugins/MapMenu/fonts/'.

```yaml
  displaynane:
    type: "customtext"
    position: "[28, 12]"
    text: "%player_displayname%"
    font: "Arial"
    size: 10
    style: 0
```
