A library letting people customize items and inventories in files
2

Customize Items

The items must always have at least two properties: an id and a type.

The id must not be changed, it has been defined by the developer and may be used in the code, allowing the plugin to identify this item amongst the others.

The type defines the type of the item via its ID, like minecraft:stick or minecraft:anvil.

The displayname sets the name of the item. You can use & color codes.

The amount gives the quantity of the itemstack.

The durability sets the actual damages of the item.

The hide_attributes hides the attributes of the item.

The hide_enchantments hides the enchantments of the item.

The hide_unbreakable hides the unbreakable attribute of the item.

The hide_can_destroy hides the “Can Destroy” lore of the item.

The hide_can_place hides the “Can Place” lore of the item.

The hide_misc hides some random values of the item.

The enchantments lists all the enchantments to apply to the item.

  • Each enchantment is a JSON object in which there is two properties:
    • the type defining the type of the Enchantment. A list of all EnchantmentTypes can be found here
    • the level, the level of the wanted enchantment

The lore, a list where a value is a line in the item’s lore. Supports & color codes.


The following should not be changed (like the id) since they are used in the code:

  • on_interact_secondary_click is used to listen to a player’s secondary click in the world.
  • on_interact_primary_click is used to listen to a player’s primary click in the world.
  • on_secondary_click is used to listen to a player’s secondary click on this item in an inventory.
  • on_primary_click is used to listen to a player’s primary click on this item in an inventory.
  • on_middle_click is used to listen to a player’s middle click on this item in an inventory.
  • on_create is used to listen the creation of this item, in case you want to do some special actions on it.

Inventories

An inventory must always have at least an id and rows defined.

The id must not be changed, it has been defined by the developer and may be used in the code, allowing the plugin to identify this inventory amongst the others.

The rows defines the number of rows this inventory will have.

The title sets the title of this inventory.

The items defines the content of the inventory:

  • Each value is a JSON object with:
    • a x coordinate, inside the inventory
    • a y coordinate, inside the inventory
    • an identifier, only use on of the two. The FileItem ID has the priority:
      • an id, the ID of a FileItem OR
      • a type, a Minecraft ID.

Category: Admin Tools

Published on Jan 15, 2018

views

stars

watchers

total downloads

Licensed under MIT

Promoted Versions

Members