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

# How to Start

Information of the plugin to work correctly on your server.

## Requirements

### Spigot <a href="#id-1-spigot" id="id-1-spigot"></a>

{% hint style="warning" %}
You need Spigot or Paper for the plugin to work. Don't use Craftbukkit.
{% endhint %}

## Optional Dependencies

### **PlaceholderAPI**

{% hint style="info" %}
This dependency is completely optional.\
If you want to use PlaceholderAPI variables in the inventory, or use Codex variables on other plugins, then you need this plugin. <https://www.spigotmc.org/resources/placeholderapi.6245/>
{% endhint %}

### Plugins to Unlock Discoveries

{% hint style="info" %}
WorldGuard (unlock discoveries when entering regions): <https://dev.bukkit.org/projects/worldguard>\
Residence (unlock discoveries when entering regions): <https://www.spigotmc.org/resources/residence-1-7-10-up-to-1-21.11480/>\
MythicMobs (unlock discoveries when killing mobs): <https://www.spigotmc.org/resources/5702/>\
EliteMobs (unlock discoveries when killing mobs): <https://www.spigotmc.org/resources/elitemobs.40090/>
{% endhint %}

## Installation

To install the plugin on your server just place the Codex file inside your plugins folder and start your server. Examples will be generated in the `categories` folder, you can use them as a reference or delete them.

## Create your first Discovery

To start creating a discovery you need to go to the `categories` folder of the plugin and open one of the category files. You can even create your own category file, but in this example I will open the **monsters.yml** file.

Copy one of the discoveries, for example the `shadow_warrior`, and paste it below, changing its name.

```yaml
discoveries:
  shadow_warrior:
    name: "#a36bfe&lShadow Warrior"
    description:
      - "#eeeeeeAn abomination found on the Shadow Swamp. It's"
      - "#eeeeeevery difficult to beat."
      - ""
      - "&7Drops:"
      - "&8❱ #eeeeeeShadow Elixir &8(25%)"
      - "&8❱ #eeeeeeIron Ingot &8(90%)"
    discovered_on:
      type: MOB_KILL
      value:
        mob_type: ZOMBIE
        mob_name: Shadow Warrior
```

Change the name and description of your new discovery.&#x20;

You also need to set when the player will unlock this discovery. I want to associate this discovery with a mob of the plugin MythicMobs, so in the `discovered_on` section I need to set the type to **MYTHIC\_MOB\_KILL**, and the `mob_type` in the `value` section to the id of this MythicMob entity.

{% hint style="info" %}
When you want to unlock the discovery ONLY VIA CONSOLE COMMAND, you can delete the entire discovered\_on section.
{% endhint %}

```yaml
forest_corrupter:
    name: "#a36bfe&lForest Corrupter"
    description:
      - "#eeeeeeThe forest of Kryngel has been corrupted by this"
      - "#eeeeeeunknown creature."
      - ""
      - "&7Drops:"
      - "&8❱ #eeeeeeCorrupted Wood &8(60%)"
      - "&8❱ #eeeeeeCorrupted Resin &8(15%)"
    discovered_on:
      type: MYTHIC_MOB_KILL
      value:
        mob_type: forest_corrupter
```

The discovery is ready, simple as that! Now you must go to the **inventory.yml** file, to the `category_monsters` inventory, and place the discovery where you desire. This is done by using the **type: "discovery: forest\_corrupter"** item on the slot you want.&#x20;

```yaml
category_monsters:
    slots: 45
    title: "&4Codex &7» &8Monsters"
    11:
      type: "discovery: shadow_warrior"
    12:
      type: "discovery: forest_corrupter"
    39:
      item:
        id: PLAYER_HEAD
        name: "&7Go Back"
        skull_data:
          texture: "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMzdhZWU5YTc1YmYwZGY3ODk3MTgzMDE1Y2NhMGIyYTdkNzU1YzYzMzg4ZmYwMTc1MmQ1ZjQ0MTlmYzY0NSJ9fX0="
      open_inventory: main_inventory
    0;8;36;44:
      item:
        id: BLUE_STAINED_GLASS_PANE
        name: " "
    1;7;9;17;27;35;37;43:
      item:
        id: BLACK_STAINED_GLASS_PANE
        name: " "
```

<figure><img src="https://1239957367-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MVwo4Q2s8AeZ_jeRctf%2Fuploads%2FcADADxNc821P8pgGNrlB%2F2024-12-23_21.10.05.png?alt=media&amp;token=913040ee-e34e-4301-9549-4826f805e2bd" alt=""><figcaption></figcaption></figure>
