Inventory

The inventory settings consist of specifying a list of slots in the slots.yml file
This file has the following structure:

slots:
  slot1:
    ...
  slot2:
    ...
    ...
    ...
  slotN:
    ...

In this case slot1, slot2 and slotN are unique ID slots. These identifiers help you understand what the slot is for, the ID itself does not affect the functionality of the slot.

Attention: Do not change the IDs of slots with the type ARMOR!


Step 1: Basic settings of the slot

Let's consider the basic properties of slots.

PropertyValuesDescription
type Slot type
(see below)
The main parameter that determines the functionality of the slot.
slot An integer from 0 to 53The slot number in the double chest (see picture below)
For some types of slots, let's say a list of numbers.
holder - A stub that will be in the slot until another item is placed in it
holder.item TextureThe texture of the stub (usually a slot icon)
holder.name LineThe name of the stub thing (usually the name of the slot)
holder.lore List of rowsDescription of the stub (usually a description of the slot)

Now let's look at the possible types of slots to understand what opportunities we have. To begin with, we'll look at them briefly, and in the next section, we'll go into more detail.

  • ARMOR: This type of slot is used only for vanilla armor, and therefore it is of little interest to us.
  • ACTIVE: Active slot. This type of slots is noteworthy in that it is necessarily synchronized with the slot in the hotbar. In this case, the effect of the item equipped in it is applied to the player only when he takes this object in his hands, that is, when the object is active. Hence the name of the slot. This type of slot is used for weapons.
  • PASSIVE: Passive slot. The effects of items in slots of this type will be applied to the player. That is, these slots are created for objects that have a passive effect. This type of slots is used for amulets, rings, artifacts, etc. Here everything is limited only by your imagination.
  • ACTION: Slot with action. In these slots you can not put objects. They are used as buttons. You can specify in the settings what action will be taken. It can be opening a workbench or an edge chest, or maybe executing a command.
  • PET & MYPET: These types of slots are used for the pet system. You place a pet's summoning stone in the slot and a threatening wolf or fast horse is running alongside you.
  • GENERIC: Base slot. This type of slots is not noticeable. In it, you can simply transfer items.
  • BACKPACK: Slot of backpack. In this slot, you can put the backpack and open it with the right mouse button. Outside this slot, backpacks do not open.
  • INFO: Information slot. In this slot, you can not put objects. It serves only to inform players. A distinctive feature is that in the description of this slot (which just will contain information), you can use placeholders.

In Minecraft 1.9 there are elite and second-hand slot. For this purpose, special types of slots are provided:

  • SHIELD: Slots the shield or the second hand. What will be placed in this slot will be displayed in the second hand.
  • ELYTRA: This slot serves to allow players to simultaneously wear elites and armor. When falling, the armor is automatically replaced with the elites from this slot, and when the elitra is landed, they are replaced by armor again.

—-


Step 2: The properties of the slot

Each type of slot has its own features, and accordingly its own individual settings. Let us examine them in detail.

Setting action (ACTION only)

PropertyValuesDescription
action WORKBENCH
ENDERCHEST
COMMAND
The action to be performed:
- opening of a workbench
- chest opening
- command
command Line with the support Placeholders
(without a slash in the beginning)
If the action type COMMAND is selected,
then it will be executed, the command specified here
gui Boolean type
Default: false
This setting is needed if, as a result,
the action is opened by the GUI

Example:

# Opening of a workbench
action: WORKBENCH
gui: true
 
# Setting clear weather in the world
action: COMMAND
command: "weather %WORLD% clear"


List of admissible items

Types of slots: ARMOR, GENERIC, ACTIVE, PASSIVE, SHIELD

A list of acceptable items is specified in the configuration “items”, as a list materials.
To exclude a material from the list, a minus sign before the material is added. In order to put any object in the slot, the word ALL is used.

Example:

# Let's make a slot for apples only
items:
- APPLE
- GOLDEN_APPLE
 
# Slot for any items, except white and black wool
items:
- ALL
- -WOOL:0
- -WOOL:15

Multiple slots of the same type

Types of slots: GENERIC, ACTION, PASSIVE

Slots of these types support multislot. That is, the same slot settings will be applied immediately to several slots.
In order to use this feature, the option“slot” Instead of one number (from 0 to 53) it is necessary to specify list numbers.

Attention: You can not use this feature in slots that synchronize with the hotbar (see next item).

Hotbar slot

Types of slots: GENERIC, ACTIVE, BACKPACK, PASSIVE

For these slots, it is possible to synchronize with the slot on the hotbar. That is, the item placed in the specified hotbar slot will also be placed in this slot. This also works in the opposite direction. The item placed in this slot will also be placed in the hotbar slot.

To do this, use the “quickbar” setting, which takes integer values ​​from 0 to 8.

Settings drop

For all slots except INFO and ACTION.

Customize “drop” takes on values boolean type. If it is false, then the item from this slot will not drop out at death.
Default: true


Step 3: Slot Requirements

You can make the slots buyable and add requirements to the level of the player.

The following settings are used for this:

OptionValuesDescription
cost.required-level A nonnegative integer
Default: 0
The level required to use the slot
cost.money Non-negative number
Default: 0
The cost of buying a slot

Example

# The slot requires level 4 and 1000 units. for purchase
cost:
  required-level: 4
  money: 1000