# 📁 Files

## Config

The main file of the plugin, have many option that you can change how you want.&#x20;

The options are described directly in the file.

{% code title="config.yml" %}

```yaml
#     ____            _             ___  __
#    / ___|___  _ __ | |_ _ __ ___ | \ \/ /
#   | |   / _ \| '_ \| __| '__/ _ \| |\  /
#   | |__| (_) | | | | |_| | | (_) | |/  \
#    \____\___/|_| |_|\__|_|  \___/|_/_/\_\
#
# Mady by TWProject ❤️ [DavideTW,RobyFasa]
#
# DISCORD: http://discord.tw-project.it/
# DOCS: https://docs.tw-project.it/
#

task-delay: 5 # Ticks delay for the task of the plugin Message.
# Increase it if the plugin can not find the players after the command /ss (in bungeecord the plugin message can reach the bukkit server before the players, so the plugin does not find the players to teleport)

enable:
  # true if you want to block the event at the player checked
  playerMoveEvent: false
  playerDropItemEvent: true
  blockBreakEvent: true
  blockPlaceEvent: true
  entityDamageByEntityEvent: true
  entityDamage: true
  foodLevelChange: true

chat:
  enable: true # true if you want to enable custom chat between staffer and player checked
  enable-unique: true # true if you want that staffer and player checked has a private chat ( the message between them will not be sent to others )
  format: "&7[&cCONTROL&7] %luckperms_prefix% %type%&7 %name% &7»&f %message%" # Format of the custom chat
  # %message% will return the message of the player
  # %name% will return the name of the player
  # %type% will return the prefix of the player
  prefix:
    staffer: "&c&lSTAFFER"
    hacker: "&4&lHACKER"
  logger: true # true if you want to log every message between staffers and hackers in console

gui:
  hacker: true # true if you want to enable the gui that will be opened at the /Control command at the player checked, configurable via gui.yml

```

{% endcode %}

***

## Messages

The file messages.yml contains all the messages from the plugin.&#x20;

You can translate every message how you want, but by default the plugin create the file messages in English.

{% code title="messages.yml" %}

```yaml
prefix: '&c&l&oCONTROL&4&l&l&oX &7- &a&lBukkit &7» '

success:
  reload: '%prefix%&aPlugin reloaded successfully!'
  location:
    saved: "%prefix%&fLocation number &c%num% %type%&f saved!"
    teleported: "%prefix%&fTeleported to the position &c%num% %type%&f!"
    removed: "%prefix%&fLocation number &c%num%&f removed!"
    list:
      - '&7&m|+-------------+|+&r &4&lLOCATION &c&lLIST &7&m+|+--------------+|'
      - ''
      - "     &f%key%# %valid% &7- %free%"
      - "     &fStaffer &7» &c%staffer%"
      - "     &fStaffer Location &7» &b%location-staffer%"
      - "     &fHacker &7» &4%hacker%"
      - "     &fHacker Location &7» &3%location-hacker%"
      - ''
      - '&7&m|+-------------+|+&r &4&lLOCATION &c&lLIST &7&m+|+--------------+|'

error:
  only-player: '%prefix%&cOnly player can execute this command.'
  no-permission: "%prefix%&cYou don't have permission to execute this command."
  not-a-number: '%prefix%&cThe string &4%string%&c does not seem to be a valid number.'
  location:
    not-found: "%prefix%&cThe location &4%num% %type%&c was not found!"
    not-set: "%prefix%&cLocation number &4%num% %type%&c is not set!"
    empty: "%prefix%&cThere are no locations set!"
```

{% endcode %}

***

## Gui

The file gui.yml is contains the gui opened to the player checked.

If you want to enable this feature you need to enable this option in the file config.yml.&#x20;

Follow the default gui for the configuration.&#x20;

### Actions

The Actions are the "events" that will occur when the player click an item in the GUI.

You can put how many actions has you want and there are this type of action:

* **COMMAND**: Command executed in the BUKKIT console of the server ( control server, NOT Proxy)
* **BROADCAST**: Broadcast in the bukkit console of the server ( control server )
* **MESSAGE**: Message at the staffer that is checking this hacker
* **BUNGEE\_COMMAND**: Command executed in the Proxy console&#x20;

PS: If you put BUNGEE\_COMMAND as action, the control will be automatically finished to avoid bugs with auto ban on disconnect.&#x20;

### Slots

If you want to put the item in multiple slots you can follow this template

```yaml
 slots:
   - 0-5
```

In this case will put the item from position 0 to 5

{% code title="gui.yml" %}

```yaml
hacker:
  gui_name: "&c&lHACK CONTROL"
  size: 45
  items:
    '1':
      material: WOOL
      data: 5
      slot: 20
      display_name: '&aI Accept'
      lore:
        - '&aI accept the control'
        - ''
        - '&fBy clicking this item &ayou will accept'
        - '&fthe hack control'
      actions:
        broadcast: # Name of the action
          type: BROADCAST # Type of action on Click, available type: COMMAND, BROADCAST, BUNGEE_COMMAND, MESSAGE ( to staffer )
          action: "&4%hacker% &ahas accepted your control!"
    '2':
      material: WOOL
      data: 4
      slot: 22
      display_name: '&eI admit'
      lore:
        - '&eI admit to using hack'
        - ''
        - '&fBy clicking this item &eyou will admit'
        - '&fto use hack!'
      actions:
        broadcast:
          type: BROADCAST
          action: "&4%hacker% &chas admitted to using hack!"
    '3':
      material: WOOL
      data: 14
      slot: 24
      display_name: '&cI Refuse'
      lore:
        - '&cI Refuse the control'
        - ''
        - '&fBy clicking this item &cyou will refuse'
        - '&fthe hack control'
      actions:
        broadcast:
          type: BROADCAST
          action: "&4%hacker% &chas refused the control!"
        ban:
          type: BUNGEE_COMMAND
          action: "ban %hacker% Refused the control"
    '4':
      material: STAINED_GLASS_PANE
      data: 15
      display_name: ' '
      slots:
        - 0-9
        - 17-18
        - 26-27
        - 35-44

```

{% endcode %}

***

### Placeholders

For the moment, in the actions string there are this placeholders:

* %hacker% - Represent the name of the player checked.

To request the addition of a **placeholder**, contact our support on discord: [HERE](https://docs.tw-project.it/#support).

***

## Location

The plugin will create the file location.yml to save your location of staffer and hacker, don't touch it!


---

# 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://docs.tw-project.it/plugins/controlx/bukkit/files.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.
