RepairItem's logo

RepairItem v

Introduction:

This plugin also adds an option to block certain items - it means they will not be able to be repaired (by the plugin). This may be useful if you have any legendary items on your server that you want players not to have infinitely.

Specification:

You can define as many blocked items as you want using configuration lists. The specification of such item is really straigtforward. You can specify these attributes:

Attribute Example specification
Type of the item (found here).
type: "BOW"
Name of the item.
name: "&bLegendary bow"
Lore of the item. Empty list (not deleted attribute) means no lore.
lore:
  - "This item can not be repaired."
Enchantments of the item each specified as NAME:LEVEL (for versions 1.11 and lower use these enchantment names, otherwise use normal enchantment names from the game - e.g. "efficiency:5", "silk touch:1"). Empty list (not deleted attribute) means no enchantments.
enchantments:
  - "UNBREAKING:5"
Flags of the item (found here). Empty list (not deleted attribute) means no flags.
flags:
  - "HIDE_ENCHANTS"
Unbreakable state of the item (this can be edited only by plugins; if true, the item will not loose durability)
unbreakable: true

Comparing:

If an item meets all attributes of any blocked item, it is considered blocked. That means, if we have these blocked items:

blocked-items:
  # The first item:
  - type: "NETHERITE_PICKAXE"
    name: "&bLegendary pickaxe"
    flags: []
  # The second item:
  - type: "NETHERITE_SWORD"
    unbreakable: true

Only netherite pickaxe with the specified name and no flags / netherite sword with unbreakable state set to true will be blocked. Again, only the specified attributes are compared. If any item has all attributes equal to any blocked item, it is blocked. Unspecified attributes are not compared - both items can have any lore or enchantments...