# Sanction

This module allows to ban, kick and mute players.

<figure><img src="/files/zihMrJZfuM3iJctJFfMy" alt=""><figcaption><p>Sanction inventories</p></figcaption></figure>

<figure><img src="/files/9E78NhY9qJJab7x9asct" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/e429wsgIreCWUtOoompV" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/AYcU1v4o0TspMIfBelcv" alt=""><figcaption></figcaption></figure>

## Configuration

### Config.yml

```yaml
########################################################################################################################
#
# ░██████╗░█████╗░███╗░░██╗░█████╗░████████╗██╗░█████╗░███╗░░██╗
# ██╔════╝██╔══██╗████╗░██║██╔══██╗╚══██╔══╝██║██╔══██╗████╗░██║
# ╚█████╗░███████║██╔██╗██║██║░░╚═╝░░░██║░░░██║██║░░██║██╔██╗██║
# ░╚═══██╗██╔══██║██║╚████║██║░░██╗░░░██║░░░██║██║░░██║██║╚████║
# ██████╔╝██║░░██║██║░╚███║╚█████╔╝░░░██║░░░██║╚█████╔╝██║░╚███║
# ╚═════╝░╚═╝░░╚═╝╚═╝░░╚══╝░╚════╝░░░░╚═╝░░░╚═╝░╚════╝░╚═╝░░╚══╝
#
# You must have MYSQL storage to use the sanction module
#
# Documentation: https://zessentials.groupez.dev/modules/sanction
#
########################################################################################################################

enable: true

# List of nicknames that cannot be sanctioned, even if they do not have permission.
protections:
  - "Maxlego08"
  - "Notch"

# Default reason for /kick
kick-default-reason: "You have been kicked"

# Default reason for /mute
ban-default-reason: "The ban hammer has spoken"

# Default reason for /ban
mute-default-reason: "You have to turn your tongue 7 times before speaking"

# Default reason for /unmute
unmute-default-reason: "You have the right to talk to us"

# Default reason for /unban
unban-default-reason: "The ban hammer gives you the right to return"

# Date format used for sanctions
date-format: "yyyy-MM-dd HH:mm:ss"

# Materials are used for sanction_history inventory

# Material used for kicks
kick-material: IRON_INGOT

# Material used for ban
ban-material: DIAMOND

# Material used for mute
mute-material: EMERALD

# Material used for unban
unban-material: IRON_INGOT

# Material used for unmute
unmute-material: COPPER_INGOT

# Material used for warn
warn-material: COAL

# Material used for mute if it is active
current-mute-material: EMERALD_BLOCK

# Material used for ban if it is active
current-ban-material: DIAMOND_BLOCK

```

### Sanction.yml

```yaml
name: '#3f3f3fSanction %zessentials_user_target_player_name%'
size: 27
items:
  player:
    type: ZESSENTIALS_SANCTION_INFORMATION
    slot: 13
    item:
      material: PLAYER_HEAD
      name: '&f%target%'
      lore:
        - ''
        - '#ffd353ℹ Informations#3f3f3f:'
        - '#3f3f3f• &7Is Banned#3f3f3f: #4cd5ff%is_ban%'
        - '#3f3f3f• &7Is Muted#3f3f3f: #4cd5ff%is_mute%'
        - ''
        - '&f➥ &nLeft Click&r&7 to sanction the player'
        - '&f➦ &nRight Click&r&7 to see the history of sanctions'
  ban:
    type: ZESSENTIALS_SANCTION
    slot: 15
    placeHolder: '%zessentials_user_target_is_ban%'
    value: true
    action: BOOLEAN
    sanction: UNBAN
    item:
      material: RED_DYE
      name: '&cThe player is banned'
      lore:
        - ''
        - '&f➥ &nClick&r&7 to unban the player'
  mute:
    type: ZESSENTIALS_SANCTION
    slot: 11
    placeHolder: '%zessentials_user_target_is_mute%'
    value: true
    action: BOOLEAN
    sanction: UNMUTE
    item:
      material: RED_DYE
      name: '&cThe player is muted'
      lore:
        - ''
        - '&f➥ &nClick&r&7 to unmute the player'
```

### Sanction\_history.yml

```yaml
name: '#3f3f3fSanctions History %zessentials_user_target_player_name%'
size: 54
items:
  back:
    isPermanent: true
    type: BACK
    slot: 49
    item:
      material: BARRIER
      name: "&cGo Back"

  next:
    type: NEXT
    isPermanent: true
    slot: 50
    item:
      material: ARROW
      name: "&fNext"

  previous:
    type: PREVIOUS
    isPermanent: true
    slot: 48
    item:
      material: ARROW
      name: "&fPrevious"

  sanctions:
    type: ZESSENTIALS_SANCTIONS
    isPermanent: true
    slots:
      - 0-44
    item:
      material: '%material%'
      name: '&fType&8: &b%type%'
      lore:
        - ''
        - '#ffd353ℹ Informations#3f3f3f:'
        - '#3f3f3f• &7Reason#3f3f3f: #4cd5ff%reason%'
        - '#3f3f3f• &7Duration#3f3f3f: #4cd5ff%duration%'
        - '#3f3f3f• &7Remaining#3f3f3f: #4cd5ff%remaining%'
        - '#3f3f3f• &7Created At#3f3f3f: #4cd5ff%created_at%'
        - '#3f3f3f• &7Expired At#3f3f3f: #4cd5ff%expired_at%'
        - '#3f3f3f• &7By#3f3f3f: #4cd5ff%sender%'
        - ''
```

### Sanctions.yml

```yaml
name: '#3f3f3fSanctions of %zessentials_user_target_player_name%'
size: 54
items:
  back:
    type: BACK
    slot: 49
    item:
      material: BARRIER
      name: "&cGo Back"

  btn-0:
    slot: 0
    item:
      material: FISHING_ROD
      name: '&fProvocations'

  btn-1:
    slot: 1
    item:
      material: WOODEN_SWORD
      name: '&fSpam/Flood'

  btn-2:
    slot: 2
    item:
      material: STONE_SWORD
      name: '&fHarassment'

  btn-3:
    slot: 3
    item:
      material: GOLDEN_SWORD
      name: '&f'

  btn-4:
    slot: 4
    item:
      material: IRON_SWORD
      name: '&f'

  btn-5:
    slot: 5
    item:
      material: DIAMOND_SWORD
      name: '&f'

  btn-6:
    slot: 6
    item:
      material: NETHERITE_SWORD
      name: '&f'

  btn-7:
    slot: 7
    item:
      material: TRIDENT
      name: '&f'

  btn-8:
    slot: 8
    item:
      material: SHIELD
      name: '&f'

  btn-9:
    slot: 9
    type: ZESSENTIALS_SANCTION
    sanction: MUTE
    duration: 1h
    reason: "Provocation"
    item:
      material: GREEN_STAINED_GLASS_PANE
      name: '&fProvocations'
      lore:
        - '#3f3f3f• &7Duration#3f3f3f: #4cd5ff1 hour'
        - ''
        - '&f➥ &nClick&r&7 to mute the player'
  btn-18:
    slot: 18
    type: ZESSENTIALS_SANCTION
    sanction: MUTE
    duration: 2h
    reason: "Provocation"
    item:
      material: YELLOW_STAINED_GLASS_PANE
      name: '&fProvocations'
      lore:
        - '#3f3f3f• &7Duration#3f3f3f: #4cd5ff2 hours'
        - ''
        - '&f➥ &nClick&r&7 to mute the player'
  btn-27:
    slot: 27
    type: ZESSENTIALS_SANCTION
    sanction: MUTE
    duration: 4h
    reason: "Provocation"
    item:
      material: ORANGE_STAINED_GLASS_PANE
      name: '&fProvocations'
      lore:
        - '#3f3f3f• &7Duration#3f3f3f: #4cd5ff4 hours'
        - ''
        - '&f➥ &nClick&r&7 to mute the player'
  btn-36:
    slot: 36
    type: ZESSENTIALS_SANCTION
    sanction: MUTE
    duration: 24h
    reason: "Provocation"
    item:
      material: RED_STAINED_GLASS_PANE
      name: '&fProvocations'
      lore:
        - '#3f3f3f• &7Duration#3f3f3f: #4cd5ff24 hours'
        - ''
        - '&f➥ &nClick&r&7 to mute the player'

  btn-10:
    slot: 10
    type: ZESSENTIALS_SANCTION
    sanction: MUTE
    duration: 1h
    reason: "Spam/Flood"
    item:
      material: GREEN_STAINED_GLASS_PANE
      name: '&fMute 1h'
      lore:
        - '#3f3f3f• &7Duration#3f3f3f: #4cd5ff1 hour'
        - ''
        - '&f➥ &nClick&r&7 to mute the player'

  btn-19:
    slot: 19
    type: ZESSENTIALS_SANCTION
    sanction: MUTE
    duration: 2h
    reason: "Spam/Flood"
    item:
      material: YELLOW_STAINED_GLASS_PANE
      name: '&fMute 2h'
      lore:
        - '#3f3f3f• &7Duration#3f3f3f: #4cd5ff2 hours'
        - ''
        - '&f➥ &nClick&r&7 to mute the player'

  btn-28:
    slot: 28
    type: ZESSENTIALS_SANCTION
    sanction: MUTE
    duration: 4h
    reason: "Spam/Flood"
    item:
      material: ORANGE_STAINED_GLASS_PANE
      name: '&fMute 4h'
      lore:
        - '#3f3f3f• &7Duration#3f3f3f: #4cd5ff4 hours'
        - ''
        - '&f➥ &nClick&r&7 to mute the player'

  btn-37:
    slot: 37
    type: ZESSENTIALS_SANCTION
    sanction: MUTE
    duration: 24h
    reason: "Spam/Flood"
    item:
      material: RED_STAINED_GLASS_PANE
      name: '&fMute 24h'
      lore:
        - '#3f3f3f• &7Duration#3f3f3f: #4cd5ff24 hours'
        - ''
        - '&f➥ &nClick&r&7 to mute the player'

  btn-11:
    slot: 11
    type: ZESSENTIALS_SANCTION
    sanction: MUTE
    duration: 24h
    reason: "Harassment"
    item:
      material: GREEN_STAINED_GLASS_PANE
      name: '&fMute 24h'
      lore:
        - '#3f3f3f• &7Duration#3f3f3f: #4cd5ff24 hours'
        - ''
        - '&f➥ &nClick&r&7 to mute the player'

  btn-20:
    slot: 20
    type: ZESSENTIALS_SANCTION
    sanction: BAN
    duration: 7d
    reason: "Harassment"
    item:
      material: YELLOW_STAINED_GLASS_PANE
      name: '&fBan 7d'
      lore:
        - '#3f3f3f• &7Duration#3f3f3f: #4cd5ff7 days'
        - ''
        - '&f➥ &nClick&r&7 to ban the player'

  btn-29:
    slot: 29
    type: ZESSENTIALS_SANCTION
    sanction: BAN
    duration: 15d
    reason: "Harassment"
    item:
      material: ORANGE_STAINED_GLASS_PANE
      name: '&fBan 15d'
      lore:
        - '#3f3f3f• &7Duration#3f3f3f: #4cd5ff15 days'
        - ''
        - '&f➥ &nClick&r&7 to ban the player'

  btn-38:
    slot: 38
    type: ZESSENTIALS_SANCTION
    sanction: BAN
    duration: 30d
    reason: "Harassment"
    item:
      material: RED_STAINED_GLASS_PANE
      name: '&fBan 30d'
      lore:
        - '#3f3f3f• &7Duration#3f3f3f: #4cd5ff30 days'
        - ''
        - '&f➥ &nClick&r&7 to ban the player'

  btn-12:
    slot: 12
    type: ZESSENTIALS_SANCTION
    sanction: MUTE
    duration: 1h
    reason: "Advertising"
    item:
      material: GREEN_STAINED_GLASS_PANE
      name: '&fMute 1h'
      lore:
        - '#3f3f3f• &7Duration#3f3f3f: #4cd5ff1 hour'
        - ''
        - '&f➥ &nClick&r&7 to mute the player'

  btn-21:
    slot: 21
    type: ZESSENTIALS_SANCTION
    sanction: MUTE
    duration: 2h
    reason: "Advertising"
    item:
      material: YELLOW_STAINED_GLASS_PANE
      name: '&fMute 2h'
      lore:
        - '#3f3f3f• &7Duration#3f3f3f: #4cd5ff2 hour'
        - ''
        - '&f➥ &nClick&r&7 to mute the player'

  btn-30:
    slot: 30
    type: ZESSENTIALS_SANCTION
    sanction: MUTE
    duration: 4h
    reason: "Advertising"
    item:
      material: ORANGE_STAINED_GLASS_PANE
      name: '&fMute 4h'
      lore:
        - '#3f3f3f• &7Duration#3f3f3f: #4cd5ff4 hour'
        - ''
        - '&f➥ &nClick&r&7 to mute the player'

  btn-39:
    slot: 39
    type: ZESSENTIALS_SANCTION
    sanction: MUTE
    duration: 24h
    reason: "Advertising"
    item:
      material: RED_STAINED_GLASS_PANE
      name: '&fMute 24h'
      lore:
        - '#3f3f3f• &7Duration#3f3f3f: #4cd5ff24 hour'
        - ''
        - '&f➥ &nClick&r&7 to mute the player'
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://zessentials.groupez.dev/modules/sanction.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
