> For the complete documentation index, see [llms.txt](https://kbanimation.gitbook.io/kbanimation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kbanimation.gitbook.io/kbanimation/installation.md).

# installation

{% tabs %}
{% tab title="EN" %}

## 🚀 Requirements & Installation

### Server Requirements

| Requirement              | Minimum Version | Notes                                      |
| ------------------------ | --------------- | ------------------------------------------ |
| **Minecraft Server**     | 1.21.x+         | Paper, Spigot, or Purpur (Paper preferred) |
| **Java Development Kit** | Java 21+  26+   | Required to run modern Spigot plugins      |

### Required Plugins (Must Install)

| Plugin              | Min. Version | Purpose                                             |
| ------------------- | ------------ | --------------------------------------------------- |
| **WeaponMechanics** | 4.3+         | Provides core shooting, recoil, and ammo systems.   |
| **BetterModel**     | Latest       | Renders the Blockbench (.bbmodel) 3D weapon models. |
| **PlaceholderAPI**  | 2.11+        | Acts as the bridge for translating HUD values.      |

### Optional Integrations

| Plugin                   | Purpose                                                       |
| ------------------------ | ------------------------------------------------------------- |
| **BetterHud**            | Displays custom icons, hit markers, damage arrows, and stats. |
| **ProtocolLib**          | Enables packet level optimization for animation rendering.    |
| **Killcam**              | Shows the killer's weapon models to dead spectators.          |
| WeaponMechanicsPlus      | In the context of referring to gun accessories.               |
| WeaponMechanicsCosmetics | showing gunshot lines                                         |

### Step-by-Step Installation

1. Download and place the required plugin files (`WeaponMechanics.jar`, `BetterModel.jar`, and `PlaceholderAPI.jar`) into your server's `plugins/` folder.
2. Place `KbAnimation.jar` into the `plugins/` folder.
3. Start the server once to generate the plugin configuration templates and directories.
4. Once generated, stop the server to complete the configuration setup.
5. Configure your custom 3D models in BetterModel and map their config YAMLs under the `KbAnimation/models/` folder (see Workflow section next).
6. Start the server again. Verify that the plugin logs are successfully showing.

### Console Boot Output

A successful launch will print the following key stages in your server logs:

```yaml
[KbAnimation] Successfully registered native BetterHud placeholders!
[KbAnimation] WeaponMechanics hooked: 3D Animations enabled for WM guns!
[KbAnimation] Loaded 4 WeaponMechanics model mappings.
[KbAnimation] KbAnimation enabled! Merged 3D models and BetterHud Addon.
```

### Generated Folder Structure

```yaml
plugins/
└── KbAnimation/
    ├── config.yml                 # Main settings (UI triggers, indicators, options)
    ├── attachments.yml            # WeaponMechanics attachment modifications
    ├── lang/
    │   ├── messages_en.yml        # English localized messages
    │   └── messages_th.yml        # Thai localized messages (ภาษาไทย)
    └── models/
        ├── ak12.yml               # Config for AK-12 (Model ID, animations, bone offsets)
        └── karambit.yml           # Config for Karambit (Melee categories)
```

{% endtab %}

{% tab title="TH" %}

## 🚀 สิ่งที่จำเป็น & การติดตั้ง

### ความต้องการระบบ (Server Requirements)

| หัวข้อ               | เวอร์ชันขั้นต่ำ | หมายเหตุ                                                                  |
| -------------------- | --------------- | ------------------------------------------------------------------------- |
| **Minecraft Server** | 1.21.x+         | แนะนำ Paper, Spigot หรือ Purpur (แนะนำ Paper ที่สุดเพื่อประสิทธิภาพที่ดี) |
| **Java Version**     | Java 21+ 26+    | จำเป็นสำหรับการรันปลั๊กอิน Minecraft ในปัจจุบัน                           |

### ปลั๊กอินที่จำเป็นต้องมี (Required Plugins)

| ชื่อปลั๊กอิน        | เวอร์ชันขั้นต่ำ | ประโยชน์และหน้าที่                                                       |
| ------------------- | --------------- | ------------------------------------------------------------------------ |
| **WeaponMechanics** | 4.3+            | เป็นแกนหลักจัดการปืน (การยิง, รีคอยล์, บรรจุกระสุน, ถือสองมือ)           |
| **BetterModel**     | เวอร์ชันล่าสุด  | ตัวเรนเดอร์โมเดล 3D (.bbmodel) ที่ทำมาจาก Blockbench ในตัวเกม            |
| **PlaceholderAPI**  | 2.11+           | ตัวเชื่อมส่งค่าของตัวแปร (เช่น ค่าโหมดไฟ, ลำกล้อง) ไปแสดงยัง HUD หรือแชท |

### ปลั๊กอินทางเลือกเสริม (Optional Integrations)

| ชื่อปลั๊กอิน             | ประโยชน์การทำงานร่วมกัน                                                    |
| ------------------------ | -------------------------------------------------------------------------- |
| **BetterHud**            | แสดงไอคอนโหมดปืน, ทิศทางโดนดาเมจ, ข้อมูลสเตตัส และเป้าปืนแบบรูปภาพบนหน้าจอ |
| **ProtocolLib**          | ช่วยประมวลผลการส่งข้อมูลแพ็คเก็ตในแอนิเมชันให้เสถียรและราบรื่นยิ่งขึ้น     |
| **Killcam**              | เล่นวิดีโอย้อนหลังตอนตาย โดยจำลองถือปืน 3D ของผู้เล่นที่ฆ่าเราด้วย         |
| WeaponMechanicsPlus      | ใช้เรียกอุปกรณ์เสริมสำหรับปืน                                              |
| WeaponMechanicsCosmetics | แสดงแนวกระสุนปืน                                                           |

### ขั้นตอนการติดตั้งทีละสเต็ป

1. ดาวน์โหลดไฟล์ปลั๊กอินหลักที่ต้องใช้ (`WeaponMechanics.jar`, `BetterModel.jar`, `PlaceholderAPI.jar`) แล้วนำไปวางในโฟลเดอร์ `plugins/` ของเซิร์ฟเวอร์
2. ดาวน์โหลดและนำไฟล์ `KbAnimation.jar` ใส่ลงในโฟลเดอร์ `plugins/`
3. เปิดเซิร์ฟเวอร์ขึ้นมา 1 ครั้ง เพื่อให้ระบบสร้างโฟลเดอร์และไฟล์การตั้งค่าเริ่มต้นขึ้นมาโดยอัตโนมัติ
4. สั่งปิดเซิร์ฟเวอร์
5. นำโมเดล 3 มิติของคุณ (`.bbmodel`) ไปลงทะเบียนใน BetterModel และนำไฟล์ YAML ตั้งค่าปืนไปวางใน `plugins/KbAnimation/models/`
6. เปิดเซิร์ฟเวอร์ขึ้นมาใหม่อีกครั้ง และตรวจสอบข้อความในคอนโซล

### ตัวอย่าง Log ในคอนโซลตอนเปิดเซิร์ฟเวอร์

เมื่อเปิดเซิร์ฟเวอร์สำเร็จ ปลั๊กอินจะแจ้งสถานะการทำระบบเป้าและ HUD ดังนี้:

```yaml
[KbAnimation] Successfully registered native BetterHud placeholders!
[KbAnimation] WeaponMechanics hooked: 3D Animations enabled for WM guns!
[KbAnimation] Loaded 4 WeaponMechanics model mappings.
[KbAnimation] KbAnimation enabled! Merged 3D models and BetterHud Addon.
```

### โครงสร้างโฟลเดอร์ที่เกิดขึ้น

```yaml
plugins/
└── KbAnimation/
    ├── config.yml                 # การตั้งค่าหลัก (ปุ่มควบคุมแต่งปืน, เป้ากระพริบ, บล็อกแสง)
    ├── attachments.yml            # การผูกกับของแต่งปืนจาก WeaponMechanics
    ├── lang/
    │   ├── messages_en.yml        # ไฟล์ข้อความภาษาอังกฤษ
    │   └── messages_th.yml        # ไฟล์ข้อความภาษาไทย
    └── models/
        ├── ak12.yml               # ตั้งค่าปืน AK12 (กำหนดแอนิเมชัน, ความเร็วปืน, แกนโมเดล)
        └── karambit.yml           # ตั้งค่ามีด Karambit (แยกหมวดหมู่เป็นมีดระยะประชิด)
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://kbanimation.gitbook.io/kbanimation/installation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
