Item

The item configuration format is a standardized system. Designed with versatility in mind, this format can be utilized in any context where items are needed. Common applications of this format include fishing loot, fishing rods, fishing baits, and even within market GUIs.

The items within the configuration are structured around keys. Each key contains a set of parameters that determine the characteristics and behavior of the item. The given example, "common_bait", illustrates how a typical item is structured.

common_bait:
  material: paper
  display:
    name: '<b><#00BFFF>Common lures'
    lore:
      - ''
      - '<#7FFFD4>Desciption:'
      - '<gray>Made from natural ingredients, it attracts'
      - '<gray>fish in a calm and steady manner. It''s the'
      - '<gray>go-to choice for those who prefer a '
      - '<gray>straightforward and reliable fishing experience.'
      - ''
      - '<#FFD700>Effects:'
      - '<gray> - Reduce fishing difficulty'
      - ''
  custom-model-data: 50001

Key:

The identifier for the item. In the provided example, the key is "common_bait".

Material:

This defines the base material or the type of the item. For "common_bait", the material is set to "paper".

  • Example:

    material: paper

Display:

This section provides the visual and descriptive aspects of the item. https://docs.advntr.dev/minimessage/format.html

  • Name: Determines the displayed name of the item. In this case, the name is "Common lures", and it's styled using color codes and text formatting.

    • Example:

      display:
        name: '<b><#00BFFF>Common lures'
  • Lore: This is a list of descriptive lines that provide more information about the item. Each line can be formatted and colored, similar to the name.

    • Example:

      display:
        lore:
          - ''
          - '<#7FFFD4>Description:'
          - '<gray>Made from natural ingredients...'
          - '...'

Custom Model Data:

This parameter is used to assign a unique model data to the item. It can be especially useful when developers want to provide custom item textures or models in games.

  • Example:

    custom-model-data: 50001

Amount

The quantity of the item that is being defined.

  • Example:

    amount: 1
    
    amount: 5~8

Tag:

Allows the addition of a Custom Fishing tag to the item.

  • Example:

    tag: false

Unbreakable:

Dictates whether the item is unbreakable

  • Example:

    unbreakable: false

NBT:

Enables further customization using Named Binary Tags. (Int) (Byte) (String) (Float) (String) (Double) (Short) (Long) (UUID) (Boolean) (IntArray) (ByteArray)

  • Example:

    nbt:
      itemsadder:
        namespace: '(String) momirealms'
        id: '(String) rainbow_fish'

You are also allowed to use placeholders and custom expressions -E: Evaluate the expression -P: Parse the placeholders

  • Example:

nbt:
  test_1: "(Int) -E:floor({SIZE} * 5 - 3)"
  myBindPlugin:
    owner: "(String) -P:{player}"

Item Flags:

Lists specific flags altering the item's appearance or behavior. https://hub.spigotmc.org/javadocs/spigot/org/bukkit/inventory/ItemFlag.html

  • Example:

    item-flags:
       - HIDE_DYE

Max Durability:

Sets the item's custom durability.

  • Example:

    max-durability: 100

Random Durability:

Decides if the item's durability is set randomly when acquired.

  • Example:

    random-durability: false

Price:

  • Description: Determines the item's price.

    • Base: Initial price of the item.

    • Bonus: Multiplier applied based on size.

  • Example:

    price:
      base: 50
      bonus: 2.5

Stackable:

Indicates if the item can be stacked with similar items.

  • Example:

    stackable: true

Prevent Grabbing:

If set to true, other players cannot grab the item.

  • Example:

    prevent-grabbing: true

Placeable:

Allows the item (Player Skull) to be placed

  • Example:

    placeable: true

Head64:

Points to a base64 encoded string, generally utilized for custom player head textures. https://minecraft-heads.com/custom-heads/

  • Example:

    head64: eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYmQ1Nzk4NzA1Yjc1YjUzY2VmNzExNjE5OGFiNWQzOGNjZGY5YjM2ODYxNzg0MjdmYjcxMDg5NmI1MjMwZDQ2MyJ9fX0=

(Stored) Enchantments:

Details enchantments that are directly applied to the item.

  • Example:

    enchantments:                 <- for gears
      minecraft:sharpness: 1
    
    stored-enchantments:          <- for enchantment books
      minecraft:sharpness: 1

Random (Stored) Enchantments:

Enumerates possible enchantments that might be applied randomly upon the item's retrieval. Each potential enchantment is associated with a level and a chance of being applied.

  • Example:

    random-enchantments:
      lv3:
        enchant: minecraft:unbreaking
        level: 3
        chance: 0.2
      lv2:
        enchant: minecraft:unbreaking
        level: 2
        chance: 0.5
      lv1:
        enchant: minecraft:unbreaking
        level: 1
        chance: 1
    random-stored-enchantments:
      lv3:
        enchant: minecraft:unbreaking
        level: 3
        chance: 0.2
      lv2:
        enchant: minecraft:unbreaking
        level: 2
        chance: 0.5
      lv1:
        enchant: minecraft:unbreaking
        level: 1
        chance: 1

(Stored) Enchantment Pool:

Enchantment pool provides the ability to control the amount of enchantments on one item instead of trying applying each configurated enchantment by probability. Plugin would not allow conflict enchantments to exist at the same time and EcoEnchants is totally compatible.

enchantment-pool:
  # max enchantments on the item
  amount:
    1: 6
    2: 3
    3: 1
  pool:
    'minecraft:unbreaking:1': 6
    'minecraft:unbreaking:2': 3
    'minecraft:unbreaking:3': 1
    'minecraft:sharpness:1': 6
    'minecraft:sharpness:2': 3
    'minecraft:sharpness:3': 1
    'minecraft:efficiency:1': 12
    'minecraft:efficiency:2': 6
    'minecraft:efficiency:3': 2

From the example, we can infer that player has 60% chance of getting 1 enchantment, 30% chance of getting 2 and 10% chance of getting 3.

amountweightprobability

1

6

60%

2

3

30%

3

1

10%

Now we assume that player can get 2 enchantments.

First enchantment

enchantmentlevelweightprobability

unbreaking

3

1

2.5%

unbreaking

2

3

7.5%

unbreaking

1

6

15%

sharpness

3

1

2.5%

sharpness

2

3

7.5%

sharpness

1

6

15%

efficiency

3

2

5%

efficiency

2

6

15%

efficiency

1

12

30%

Second enchantment (Assuming the first enchantment is sharpness)

enchantmentlevelweightprobability

unbreaking

3

1

3.33%

unbreaking

2

3

10%

unbreaking

1

6

20%

sharpness

3

1

0%

sharpness

2

3

0%

sharpness

1

6

0%

efficiency

3

2

6.67%

efficiency

2

6

20%

efficiency

1

12

40%

Last updated