# Custom Setup & Configuration

### Step 1: Installation

1. Download the latest release
2. Place the `.jar` file in your server's `plugins/` folder
3. Make sure you have installed Vault or CoinsEngine
4. Restart your server
5. Configuration files will be generated in `plugins/XianWithdraw/`

***

### Step 2: Set Up Your Currencies

<sub>You can skip this if you already did.</sub>

#### For CoinsEngine Users

1. Install CoinsEngine
2. Go to `plugins/CoinsEngine/currencies/`
3. Create your currency file (e.g., `coins.yml`)
4. Restart server
5. XianWithdraw auto-detects all currencies

#### For Vault Users

1. Install Vault + economy plugin
2. Restart server
3. Vault currency auto-appears as `vault`
4. Customize in `settings.yml`

***

### Step 3: Configure settings.yml

Open `plugins/XianWithdraw/settings.yml`.

***

#### Understanding the Structure

```
settings:
  default-material: ...     ← 1. Default item appearance
  default-glow: ...        ← 2. Default glow effect
  number-format: ...        ← 3. How numbers look
  gui-display: ...         ← 4. Currency display in GUI
  gui-amounts:             ← 5. Amount buttons
    - ...
```

***

#### 3.1: Default Item Material

The `default-material` sets what item players receive.

**Suggested choices:**

* `PAPER` - Classic look
* `GOLD_INGOT` - For valuable currencies
* `DIAMOND` - For premium currencies
* `EMERALD` - For eco-friendly currencies

**Full list:** Visit [Minecraft Wiki - Materials](https://minecraft.wiki/w/Java_Edition_data_values#Blocks)

**Example:**

```yaml
default-material: GOLD_INGOT
```

***

#### 3.2: Default Glow Effect

The `default-glow` adds sparkle to withdraw items.

```yaml
default-glow: true   # Items glow like enchanted
default-glow: false  # No glow
```

***

#### 3.3: Number Format

The `number-format` changes how numbers display.

```yaml
number-format: "#,##0.##"   → 1,234.56
number-format: "#,##0"      → 1,235
number-format: "0.00"       → 1234.56
```

***

#### 3.4: GUI Display Format

The `gui-display` sets how currencies appear in the GUI.

**Available placeholders:**

| Placeholder | What it shows    |
| ----------- | ---------------- |
| `{name}`    | Currency name    |
| `{symbol}`  | Currency symbol  |
| `{balance}` | Player's balance |

**Example:**

```yaml
gui-display: "&7{name} &8- &f{symbol}"
```

**Color codes:** Use `&#RRGGBB` for hex colors.

**Color Code List:** [Minecraft Wiki - Formatting codes](https://minecraft.wiki/w/Formatting_codes)

**Color Code Generator**: [RGB Birdflop - Minecraft RGB Gradient Creator](https://minecraft.wiki/w/Formatting_codes)

***

#### 3.5: GUI Amount Buttons

The `gui-amounts` creates buttons in the amount selection screen.

```yaml
gui-amounts:
  - 100
  - 1000
  - 10000
  - 100000
  - 1000000
  - all
  - custom
```

* Use numbers (`100`, `1000`)
* Use `all` for entire balance
* Use `custom` to prompt command input
* Max 7 items (uses slots 10-16)

***

### Step 4: Customize Currency Items

Each currency can have unique item appearance. <sub>(ofc you can use the same items if you want)</sub>

#### Understanding the Structure

```
currencies:
  coins:                     ← 1. Currency ID
    item: PAPER              ← 2. Item material
    glow: false              ← 3. Glow effect
    titel: "..."             ← 4. Display name
    lore:                    ← 5. Description
      - "..."
```

#### 4.1: Set Item Material

```yaml
currencies:
  coins:
    item: GOLD_INGOT
```

***

#### 4.2: Enable Glow Effect

Do it if you want

```yaml
currencies:
  coins:
    glow: true
```

***

#### 4.3: Set Display Name

Use `%amount%` placeholder for the withdraw amount.

```yaml
currencies:
  coins:
    titel: "&#FFD700%amount% Coins"
```

**Color codes:**

| Code       | Color |
| ---------- | ----- |
| `&#FFD700` | Gold  |
| `&#FF5555` | Red   |
| `&#55FF55` | Green |
| `&#5555FF` | Blue  |
| `&#AAAAAA` | Gray  |

***

#### 4.4: Add Description (Lore)

```yaml
currencies:
  coins:
    lore:
      - "&7Value: &#FFD700%amount%"
      - "&7Currency: &#FFD700Coins"
      - ""
      - "&8&oRight-click to deposit"
```

* Empty line (`""`) creates a gap
* `&8&o` makes text gray and italic

***

#### Full Example

```yaml
currencies:
  coins:
    item: GOLD_INGOT
    glow: true
    titel: "&#FFD700%amount% Coins"
    lore:
      - "&7Value: &#FFD700%amount%"
      - "&7Currency: &#FFD700Coins"
      - ""
      - "&8&oRight-click to deposit"
```

***

### Step 5: Configure Custom Commands

Add shortcuts for specific currencies.

#### Understanding the Structure

```
commands:
  coins:                     ← 1. Command name
    currency: coins         ← 2. Which currency
    aliases:                 ← 3. Shortcuts
      - c
    permission: ...          ← 4. Required permission
```

#### Example

```yaml
commands:
  coins:
    currency: coins
    aliases:
      - c
    permission: xianwithdraw.withdraw.coins
```

**Usage:**

```
/withdraw coins 100
/w c 500
```

***

### Step 6: Configure messages.yml

Open `plugins/XianWithdraw/messages.yml`.

#### Understanding the Structure

```
messages:
  <message-name>:
    module:
      chat:                 ← 1. Chat message
        enabled: true
        message:
          - "..."
      actionbar:             ← 2. Actionbar message
        enabled: false
        message:
          - ""
      title:                 ← 3. Title
        enabled: false
        message:
          - ""
      subtitle:              ← 4. Subtitle
        enabled: false
        message:
          - ""
```


---

# 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://xianstudio.gitbook.io/xianstudio-docs/xianwithdraw/custom-setup-and-configuration.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.
