Inventory Tutorial

With my plugin you can fully modify the Codex inventory, so it is possible you'll find this section a little bit complicated to understand! Here I will show you an example with a single category.

Inventories:
  main:
    slots: 45
    title: '&4Codex &7» &8All Categories'
    '21':
      type: history
      item: BOOK
      name: '&7Category: %name%'
      lore:
      - '&eIn your adventures you''ll find some'
      - '&einteresting knowledge.'
      - ''
      - '&7Unlocked: %unlocked% &8[%progress_bar%&8] &8(&7%percentage%&8)'
      open_inventory: history_discoveries
  history_discoveries:
    slots: 45
    title: '&4Codex &7» &8History'
    '11':
      type: history;1
      item: PAPER
      name: '&6Discovery: %name%'
      lore:
      - '%lore%'
    '39':
      skull_data: eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMzdhZWU5YTc1YmYwZGY3ODk3MTgzMDE1Y2NhMGIyYTdkNzU1YzYzMzg4ZmYwMTc1MmQ1ZjQ0MTlmYzY0NSJ9fX0=
      name: '&7Go Back'
      open_inventory: main
    0;8;36;44:
      item: BLUE_STAINED_GLASS_PANE
      name: ' '
    1;7;9;17;27;35;37;43:
      item: BLACK_STAINED_GLASS_PANE
      name: ' '

You will always need to mantain the "main" path, which represents the main inventory when using the /codex command. Here you can define different items by setting the slot number on the same section name as shown in the config.

If an item represents a Discovery category you need to add the type option and write the category name (the name of the file). This will allows you to add variables such as:

  • %name% (The name of the category)

  • %unlocked% (Total of unlocked discoveries from this category)

  • %percentage% (Percentage of completition of this category)

  • %progress_bar% (Progress bar showing the completition of this category)

You can add the open_inventory option to open another created inventory when the player clicks on the item. In this case, in the main inventory there is an item in slot 21 which will open the history_discoveries inventory. In this inventory there is an item on slot 39 to go back to the main inventory.

If you want an item to respresent a Discovery instead of a Category you need to add the same type option but this time adding a ; followed with the name of the discovery. This wills allows you to add variables such as:

  • %name% (The name of the discovery)

  • %lore% (The lore of the discovery)

Here are two images showing this example ingame:

Inventories options

Items options

Last updated