How to Start

Information of the plugin to work correctly on your server.

Requirements

Spigot

You need Spigot or Paper for the plugin to work. Don't use Craftbukkit.

Optional Dependencies

PlaceholderAPI

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/

Plugins to Unlock Discoveries

WorldGuard (unlock discoveries when entering regions): https://dev.bukkit.org/projects/worldguard 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/

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.

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.

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.

When you want to unlock the discovery ONLY VIA CONSOLE COMMAND, you can delete the entire discovered_on section.

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.

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: " "

Last updated