Inventory.yml Tutorial

Here you can modify all aspects of the inventories of EpicCraftingsPlus.

Inventories

There are different inventories on the plugin:

  1. main: Main inventory opened using the /ecraft command. This inventory shows the categories.

  2. category_<category>: You must create an inventory per category, replacing the <category> tag with the name of the category. For example, category_weapons_armor represents the inventory for the weapons_armor category, where all of the craftings from this category will appear. If you create a new category in the categories.yml file named "potions", then you must add a new inventory on the inventory.yml file called category_potions.

  3. crafting_menu: DEFAULT inventory that opens when a player selects a crafting to create. You can also create a crafting menu per category using the following name: <category>_crafting_menu If you have a category called potions and you create an inventory called potions_crafting_menu it means this inventory will replace the default crafting_menu for that category.

  4. bypass_cooldown_menu: Inventory that opens when a player right clicks a crafting to bypass its cooldown.

Inventories properties

Each inventory has 3 properties show below:

Inventories:
  main:
    slots: 45
    title: "&4&lCrafting Inventory"
    21:
      type: category:weapons_armor
      open_inventory: category_weapons_armor
    23:
      type: category:others
      open_inventory: category_others

Slots

Defines the amount of slots this inventory will have. You can only use 9, 18, 27, 36, 45 or 54.

Title

Defines the title of this inventory.

Item Slot

Position of an item in the inventory. For a much simpler way of placing items on inventories you can use some formats:

Format 1

This will set an item on the slot 0.

0:
  item: 
    id: BLACK_STAINED_GLASS_PANE
    name: " "

Format 2

This will set the same item on slots 0, 8 and 16.

0;8;16:
  item: 
    id: BLACK_STAINED_GLASS_PANE
    name: " "

Format 3

This will set the same item from slots 0 to 8 (0, 1, 2, 3, 4, 5, 6, 7, 8)

0-8:
  item: 
    id: BLACK_STAINED_GLASS_PANE
    name: " "

Combining formats

This will set the same item on slots 0 to 7, 9, and 17 to 26.

0-7;9;17-26:
  item: 
    id: BLACK_STAINED_GLASS_PANE
    name: " "

Item Slots Properties

On these item slots you can create your own items, also, you can use the Custom Items detailed later.

Item

This is the item itself. Use the guide from HERE to create them.

0-9;17;18;26;27;35;36-44:
       item:
         id: "BLACK_STAINED_GLASS_PANE"
         name: " "

Open Inventory

Add this option to open another inventory when the player clicks on this item.

36:
      item:
        id: "ARROW"
        name: "&7Back to Categories"
      open_inventory: main

You can use open_inventory: previous to open the previous EpicCraftingsPlus inventory the player was in.

Click Actions

Adds a list of actions to be executed when clicking on the item. List of actions HERE.

36:
       item:
         id: "ARROW"
         name: "&7Go Back to an external Inventory"
       click_actions:
       - "message: %player% &aOpening the main server menu" 
       - "console_command: chestcommands open %player% menu_server"

Click Commands

USE CLICK ACTIONS INSTEAD, THIS OPTION WILL BE REMOVED SOON.

Adds a list of commands to be executed from the console when clicking on the item. You can use the msg %player% command to send a simple message to the player.

36:
       item:
         id: "ARROW"
         name: "&7Go Back to an external Inventory"
       click_commands:
       - "msg %player% &aOpening the main server menu" 
       - "chestcommands open %player% menu_server"

Not Show on Blocked Inventories

This is a special option. When enabled, this item will not appear in the inventory if the category is blocked. When is a category considered to be blocked?

  • When the player opens a categorized crafting place.

  • When opening a category to the player using /ecraft opencategory <player> <category> true

36:
      item:
        id: "ARROW"
        name: "&7Back to Categories"
      open_inventory: main
      not_show_on_blocked_inventories: true

Not Show on Blocked Craftings

This is a special option. When enabled, this item will not appear in the inventory if the category is blocked. When is a category considered to be blocked?

  • When opening a crafting to the player using /ecraft opencraft <player> <category> true

'36':
      item:
        id: ARROW
        name: '&7Go Back'
      open_inventory: previous
      not_show_on_blocked_craftings: true

Type

When selecting a type, the item will be replaced with a Custom Item from the inventory.yml file. You don't need to add any other property.

19:
       type: final_crafting

Custom Items

There are a lot of custom items which are necessary for the inventory to work. These custom items are specified under the "type" option.

Category item

This item will be replaced with the category item from the categories.yml file. When the player clicks on it, the inventory from that category will open. Use the following format: category:<category name>

'21':
   type: category:weapons_armor
'23':
   type: category:others

Previous Page and Next Page

When players click on this item, the previous/next page from the current category inventory will be opened. For obvious reasons requires to be on a category_<category> inventory. The page system will depend completely in the amount of slots you have defined for the preview_crafting custom item.

previous_page:
    item:
      id: ARROW
      name: '&7Previous Page'
next_page:
    item:
      id: ARROW
      name: '&7Next Page'

Previous Crafting and Next Crafting

When players click on this item, they will go to the previous/next crafting of the current category. This item needs to be on the crafting_menu inventory.

previous_crafting:
    item:
      id: RED_STAINED_GLASS_PANE
      name: '&7« Previous Crafting «'
next_crafting:
    item:
      id: RED_STAINED_GLASS_PANE
      name: '&7» Next Crafting »'

Preview Crafting

This item represents the preview item for the crafting including some extra properties in the lore/description, like the cooldown if it applies. When players click on this item, the crafting inventory for this item will be opened. You don't need to specify an item, since it is the same as the crafting. This item requires to be on a category_<category> inventory.

preview_crafting:
    name: '&eCraft %name%'
    cooldown_info_lore:
    - ''
    - '&9Cooldown: &7%time%'
    in_cooldown_lore:
    - ''
    - '&8[&cThis craft is being created&8]'
    - '&6You need to wait: &7%time%'
    cooldown_ready_lore:
    - ''
    - '&8[&aThis craft is ready to be claimed!&8]'
    - '&6&lCLICK TO GET IT!'
    bypass_cooldown_lore:
    - ''
    - '&c&lRIGHT CLICK to bypass cooldown'

Final Crafting

This item represents the final crafting inside the crafting inventory, including a cooldown lore if applies. This item needs to be on the crafting_menu inventory.

final_crafting:
    cooldown_info_lore:
    - ''
    - '&9Cooldown: &7%time%'

Required Item

This item represents one of the required items to craft the main item. This item needs to be on the crafting_menu inventory.

required_item:
    status_lore:
    - ''
    - '&6You need this to craft the item'
    - '&8Status: %current_items%&8/%total_items%'
    no_items_status_color: '&c'
    some_items_status_color: '&e'
    all_items_status_color: '&a'
    not_removed_lore:
    - ''
    - '&8[&7This item will NOT be removed!&8]'

No Required Items Item

This item will be placed ONLY if this crafting doesn't have required items. This item needs to be on the crafting_menu inventory.

no_required_items:
    item:
      id: BARRIER
      name: "&cThis crafting doesn''t have required items"

Click to Craft Item

This item must be used by the players to craft the item. It contain success rate lore properties and extra requirements message if applies. This item needs to be on the crafting_menu inventory.

click_to_craft:
    item:
      id: CRAFTING_TABLE
      name: '&2&lClick to Craft It!'
    success_probability_lore:
    - ''
    - '&7Probability of Success: &c%chance%%'

Craft with Money Item

This item will be placed only if the craft with money option is enabled on the crafting. When players click on it, they will use money to craft the item. This item needs to be on the crafting_menu inventory.

craft_with_money:
    item:
      id: LIME_DYE
      name: '&6&lCraft Using Money'
      lore:
      - '&7Click to craft for &a$%cost%&7.'

Bypass Cooldown Items

These items are buttons to accept or deny bypassing the cooldown of a crafting using money when right-clicking the item. These items need to be on the bypass_cooldown_menu inventory.

bypass_cooldown_yes:
    item:
      id: GREEN_TERRACOTTA
      name: '&a&lYES'
bypass_cooldown_no:
    item:
      id: RED_TERRACOTTA
      name: '&c&lNO'

Last updated