> For the complete documentation index, see [llms.txt](https://thanhpahts-organization.gitbook.io/product-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://thanhpahts-organization.gitbook.io/product-docs/ultimate-crafting/ii.-configuration.md).

# II. Configuration

## Folder Structure

When the server starts for the first time, the plugin creates this structure:

| <p>plugins/<br>└─ UltimateCrafting/<br>├─ config.yml<br>├─ messages.yml<br>├─ categories.yml<br>│<br>├─ gui/<br>│ ├─ main.yml<br>│ ├─ category.yml<br>│ └─ craft.yml<br>│<br>├─ categories/<br>│ ├─ sword/<br>│ │ └─ diamond\_sword.yml<br>│ │<br>│ └─ armor/<br>│ └─ diamond\_chestplate.yml<br>│<br>└─ data/</p> |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |

### **1. config.yml**

config.yml controls global behavior, hooks, crafting behavior, editor behavior, and display formatting.

| Key                        | Meaning                                                      |
| -------------------------- | ------------------------------------------------------------ |
| placeholders.success       | Text used when a requirement is satisfied.                   |
| placeholders.failed        | Text used when a requirement is missing.                     |
| settings.debug             | Prints extra diagnostic information to console when enabled. |
| settings.auto-save         | Saves editor changes immediately when possible.              |
| settings.editor-default    | Enables Editor Mode by default after server start.           |
| hooks.mmoitems             | Enables MMOItems integration.                                |
| hooks.vault                | Enables Vault economy integration.                           |
| hooks.playerpoints         | Enables PlayerPoints integration.                            |
| hooks.placeholderapi       | Enables PlaceholderAPI integration.                          |
| crafting.shift-craft       | Allows shift-click style crafting where supported.           |
| crafting.close-after-craft | Closes the craft GUI after a successful craft.               |
| crafting.max-craft-amount  | Upper limit for craft amount calculations.                   |
| editor.chat-timeout        | Timeout value for chat input workflows.                      |
| editor.auto-create-file    | Allows editor actions to create category and recipe files.   |
| editor.save-after-edit     | Saves editor edits to disk immediately.                      |

#### Example:

```
placeholders:
  success: "&8• &a&l✔"
  failed: "&8• &c&l✖"

# General plugin behavior.
settings:
  # Print extra diagnostic information to console.
  debug: false
  # Save editor changes immediately when possible.
  auto-save: true
  # Only players with OP permissions or the "ultimatecrafting.editor" permission can see the edit mode toggle button.
  # Enable editor mode by default after server start.
  editor-default: false

# Optional plugin integrations.
hooks:
  mmoitems: true
  vault: true
  playerpoints: true
  placeholderapi: true

# Runtime crafting behavior.
crafting:
  # Allow shift-click style crafting where supported.
  shift-craft: true
  # Close craft GUI after a successful craft.
  close-after-craft: false
  # Upper limit for craft amount calculations.
  max-craft-amount: 64

# In-game editor behavior.
editor:
  # Seconds before chat input should be considered stale by external logic.
  chat-timeout: 60
  # Create recipe/category files from editor actions.
  auto-create-file: true
  # Save editor edits to disk immediately.
  save-after-edit: true
```

### **2. Requirement Placeholder Display**

Requirement display formats are configured in config.yml under display.requirement-placeholders.

```
display:
  requirement-placeholders:
    items:
      vanilla: "%status% &ex%amount% %item_require%"
      mmoitems: "%status% &ex%amount% %item_require%"
    money: "%status% &e$%amount%"
    points: "%status% &e%amount% PlayerPoints"
    permission: "%status% &e%permission%"
    placeholder: "%status% &e%placeholder% %operator% %value%"
```

#### Available values:

| Placeholder     | Meaning                                           |
| --------------- | ------------------------------------------------- |
| %status%        | Uses placeholders.success or placeholders.failed. |
| %amount%        | Required amount.                                  |
| %item\_require% | Vanilla material or MMOItems type:id.             |
| %item%          | Vanilla material name.                            |
| %type%          | MMOItems type.                                    |
| %id%            | MMOItems item ID.                                 |
| %permission%    | Permission node.                                  |
| %placeholder%   | PlaceholderAPI placeholder.                       |
| %operator%      | Placeholder comparison operator.                  |
| %value%         | Placeholder comparison value.                     |

### **3. Recipe Icon Footer**

Recipe icons shown inside the category GUI can display requirement information using display.recipe-icons.footer.

```
  recipe-icons:
    # Max visual stack amount for recipe icons. Actual recipe amount is unchanged.
    amount: 64
    # Footer appended to recipe icons in category GUI.
    footer:
      - "&7&m                             "
      - "&eIngredient required:"
      - "%ultimatecrafting_requirement_items%"
      - "&e"
      - "&eCurrency required:"
      - "%ultimatecrafting_requirement_money%"
      - "&e%ultimatecrafting_requirement_points%"
      # - "&eOther required:"
      # - "&8• &e%ultimatecrafting_requirement_permission%"
```

amount controls the maximum visual stack size displayed in the GUI. It does not change the actual recipe output amount.

### **4. Requirement Item Display**

Requirement items in the craft GUI are configured under display.requirement-items.

```
  requirement-items:
    vanilla:
      amount: 64
      lore:
        - "&7&m                             "
        - "&7Required Amount: &e%amount%"
    mmoitems:
      amount: 64
      append-lore:
        - "&7&m                             "
        - "&7Required Amount: &e%amount%"

```

For vanilla requirements, lore replaces the displayed lore. For MMOItems requirements, append-lore keeps the original MMOItems lore and adds the configured lines below it.

### **5. Output Item Display**

Output items in the craft GUI are configured under display.output-items.

```
  output-items:
    vanilla:
      amount: 64
      lore:
        - "&7&m                             "
        - "&7Output Amount: &e%amount%"
    mmoitems:
      amount: 64
      append-lore:
        - "&7&m                             "
        - "&7Output Amount: &e%amount%"
```

For MMOItems output, the original MMOItems name and lore are kept, and the configured footer is appended.

### **6. messages.yml**

messages.yml controls all player-facing plugin messages. Messages are currently sent through chat.

```
prefix: "&8[&bUltimateCrafting&8] "

errors:
    no-permission: "&cYou do not have permission."
    player-only: "&cOnly players can use this command."
    invalid-syntax: "&cInvalid syntax."
    invalid-amount: "&cPlease type a valid amount greater than 0."

success:
    reload: "&aConfiguration, GUIs, categories and recipes reloaded."
    save: "&aPending recipe changes saved."
    craft: "&aCrafted %recipe%."
```

Editor prompt messages are also configured here:

```
editor:
    enter-category-id: "&eType the new category id, or &ccancel&e."
    enter-recipe-id: "&eType the new recipe id, or &ccancel&e."
    enter-item-amount: "&eType the item amount, or &ccancel&e."
    enter-money: "&eType the money requirement, or &ccancel&e."
    enter-points: "&eType the PlayerPoints requirement, or &ccancel&e."
    enter-permission: "&eType the permission node, or &ccancel&e."
    enter-placeholder: "&eType placeholder operator value, or &ccancel&e."
    enter-success-rate: "&eType a success rate from 0 to 100, or &ccancel&e."
```

### **7. categories.yml**

categories.yml controls category buttons in the main GUI. Each key under categories should match a folder inside categories/.

```
categories:
  sword:
    # Slot in gui/main.yml category-area.
    slot: 20
    material: DIAMOND_SWORD
    name: "&cSword"
    lore:
      - "&7Craft blade weapons."
    # Leave empty for no category permission.
    permission: ""

  armor:
    slot: 24
    material: DIAMOND_CHESTPLATE
    name: "&9Armor"
    lore:
      - "&7Craft protective armor."
    permission: ""

```

### **8. GUI Files**

| File             | Controls                                      |
| ---------------- | --------------------------------------------- |
| gui/main.yml     | Main category menu.                           |
| gui/category.yml | Recipe list menu for one category.            |
| gui/craft.yml    | Single recipe craft menu and editor controls. |
