Items

All actions with objects are made in the file items.yml
The items.yml file has the following structure:

items:
  item1:
    ...
  item2:
    ...
    ...
    ...
  itemN:
    ...

In this case, item1, item2, and itemN are item IDs. This ID is entered in the command to retrieve the item, the ID itself does not affect the item itself.

Attention: if you change or delete an item from this file, it will be changed / deleted for all users who have an item with this ID.


Step 1: Appearance of the subject

So, let's analyze all the properties responsible for the appearance of the object:

PropertyValuesDescription
texture TextureThe object texture displayed in the game
name Line without the support of colors Name of the item in the game
lore List of rows Description of the object in the game. This can be both an artistic text, and an additional description of the subject.
rarity COMMON
UNCOMMON
RARE
MYTHICAL
LEGENDARY
At the moment (v2.0.0) this parameter is responsible only for the color of the name of the item
COMMON - Gray (&7)
UNCOMMON - Gold (&6)
RARE - Blue (&9)
MYTHICAL - Dark Purple (&5)
LEGENDARY - Light Purple (&d)


Example

# Item ID; on it you can identify the subject
test:
  # The texture is changed in the resource pack
  texture: DIAMOND_HOE:23
  name: "Ring of Power"
  lore:
  - "&e&oUnknown to anyone the terrible power found in"
  - "&e&to the tomb of artifacts, for our investigations"
  - "&e&they ended very badly..."
  rarity: RARE

Let's see how the object looks in the game:

As we see everything turned out. Color Codes &e&o made the artistic description in yellow italics, and the rarity of RARE gave the name of the object a blue color.


Step 2: The properties of the object

Now, when the appearance is in order, let's move on to the characteristics of the object

PropertyValuesDescription
drop Boolean type
Default - true
Should the item fall out of inventory when the player dies
unbreakable Boolean type
Default - false
Should the object be indestructible?
hide-stats Boolean type
Default - false
Hide item characteristics
All the characteristics (specified in the stats property) will be hidden and instead of them
the line from the language file will be displayed, informing about it
stats List characteristics of
(see below)
Passive properties of the object
* All these properties are optional. If you do not specify them, the default values ​​will be used

stats
This property should be considered separately and in more detail.

This property is populated as a list, each element of which has the format: <characteristic> <sign><value>
At the moment, there are the following characteristics:

CharacteristicValueDescription
DAMAGE Number or percentageMelee Weapon Damage
BOW_DAMAGE Number or percentageBow damage
HAND_DAMAGE Number or percentageDamage when striking with a hand without a weapon
CRIT_CHANCE PercentCritical strike chance
CRIT_DAMAGE PercentPercentage of additional damage from a critical strike
HEALTH Number or percentageHealth
ARMOR Number or percentageBumper
SPEED PercentPlayer Speed
JUMP Number or percentage

There are only two operations: + and -
All characteristics support ranges of values. But not for everything it's worth using them, because for some characteristics (eg HEALTH) this will be illogical.


Example

test:
  texture: DIAMOND_HOE:23
  name: "Ring of Power"
  lore:
  - "&e&oUnknown to no one is the terrible power found in"
  - "&e&oto the tomb of artifacts, for our"
  - "&e&oended very badly..."
  rarity: RARE
  drop: false
  # The following two values ​​are not necessary for us and therefore we commented on them,
  # but could not write at all
  #unbreakable: false
  #hide-stats: false
  stats:
  # The item will add 5 to 10 units. impact damage
  - DAMAGE +5-10
  # The item takes 10% of the health while on.
  - HEALTH -10%
  # Critical damage with this item will be 250-300%
  - CRIT_DAMAGE +150-200%

Let's see how the object looks now in the game:

The screenshot is not visible, but the player has 9 hearts instead of 10


Step 3: Requirements for the subject

You can add requirements to the player to use the item.

PropertyValuesDescription
level The whole non-negative numberRequired level for the use of the item
Accounted for selected level system
classes List of classesRequired classes. For example:
classes:
- Mage
- Warrior
Accounted for selected class system


Example

test:
  texture: DIAMOND_HOE:23
  name: "Ring of Power"
  lore:
  - "&e&oUnknown to anyone the terrible power found in"
  - "&e&oto the tomb of artifacts, for our investigations"
  - "&e&oended very badly ...​​​​​​​"
  rarity: RARE
  drop: false
  stats:
  - DAMAGE +5-10
  - HEALTH -10%
  - CRIT_DAMAGE +150-200%
  level: 10
  classes:
  - Titan
  - The Lord

Let's look at the object in the game​​​​​​​:

Now only masters and titans can wear a ring


Step 4: Active properties of the object

All active properties are sub-options abilities

At the moment there are only three options for active abilities, this: permissions, right-click & left-click. Let's consider them in detail.

permissions
List of permissions. The format is the same as in any permissions manager.

This option allows you to assign an object with one or more permissions. As long as the object is worn, the player will have these permissions, once the item is removed, the permissions will disappear.

right-click & left-click
These features work identically, with the only difference being that are responsible for the right and left mouse button, respectively.

These options allow you to assign any commands to the mouse buttons that the player can use while holding the object in his hand. Now let's look at how to configure these properties:

PropertyValuesDescription
op Boolean typeDetermines whether the team will be used on behalf of the player or on behalf of the operator
command Line with the support Placeholders
(without a slash in the beginning)
The command to be executed when the mouse button is pressed
lore LineDescription of the command action displayed in the item description
message LineMessage displayed to the player after using the command


Example

test:
  texture: DIAMOND_HOE:23
  name: "Ring of Power"
  lore:
  - "&e&oUnknown to anyone the terrible power found in"
  - "&e&oto the tomb of artifacts, for our"
  - "&e&oended very badly ..."
  rarity: RARE
  drop: false
  stats:
  - DAMAGE +5-10
  - HEALTH -10%
  - CRIT_DAMAGE +150-200%
  level: 10
  classes:
  - Titan
  - The Lord
  # We begin to describe the active properties​​​​​​​
  abilities:
    permissions:
    # This item will allow the player to change the game mode (not for nothing that he is only available to the titans)
    - essentials.gamemode
    right-click:
   # The player is unlikely to have the right to such a command, so the team must run from the operator
      op: true
      # Pressing the PCM will set the day. Placeholder %WORLD% will be replaced by the name of the current world
      command: "time set day %WORLD%"
      lore: "Start a new day"
      message: "Good day!"
    left-click:
      op: true
      # When pressing the LMB, we will be sunny
      command: "weather %WORLD% sun"
      lore: "Clear Heaven"
      message: "Sunny!"

And now our subject is completely ready: