Skip to content
pustinek edited this page May 3, 2020 · 8 revisions

Items

Items are defined in items folder

Item commands

Item can have unlimited commands, with the same action ex. left_click. Command is made from 3 parts. action : command_type command_text

  • action is the click type (left_click, right_click, right_shift_click, etc.)
  • command_type type of command (run command, message player, close GUI, open GUI, etc.)
  • command_text text that will be used in the command

Item config

# settings are used to enhance the items, with prefixes and variables
settings:
  # prefix helps with organizing the menus, where the item is referenced,
  # using bellow example `example` will require you to reference the item with prefix `example`.
  # EXAMPLE for bellow items -> example.ITEM_1 , example.ITEM_2
  prefix:
    enabled: false
    value: "example"
  # Variables defined here can be referenced in item lore and name. example seen in ITEM_1 lore
  variables:
    variable1: "This is a variable"
items:

  ITEM_1:
    name: "Example item"
    lore:
      - "Variable will be placed here -> {variable1}"
    # commands: command FORMAT -> ( action : command_type <command_text> )
    commands:
      - "lc : cmd help" # will run command help as player on left click
      - "rc : msg You right clicked" # will message player `You right clicked`
    conditions:
      - "lc : itemfilter.use : You agent allowed to use the itemfilter !"
    enchantments:
      - durability 10 # FORMAT -> ( enchantment_name enchantment_level )
    # flags: applied to items, can be found on spigot page (https://hub.spigotmc.org/javadocs/spigot/org/bukkit/inventory/ItemFlag.html)
    flags:
      - SHOW_ENCHANTMENTS

  ITEM_2:
    name: "Home item"
    material: "DIRT_BLOCK"
    skull_id:
    amount: 10
    lore:
      - "this is an example item"

Clone this wiki locally