Item Settings

🔗 Adding an Item

Items are listed under the 'item' section in a Panels YAML file. Items can have various different configurations. All of the options in this wiki page will cover what you can add to change your items appearance.

The below code shows how an item might look. You can use placeholders for your item slots, if you use a placeholder for the items slot, it will not show up in the online editor.

#The items slot, 0 being the first slot at the top left
'0':
    #A custom material
    material: IRON_INGOT
    #A custom name for your item
    name: 'Join the Survival Server'

🔗 Material

The material an item will be.

#A regular material
material: IRON_INGOT
#A custom tag material
material: cps= self

If you want to use a custom material, use one of the following Material Tags.

Tag Description
cps= Used for heads. Use cps= self for your own head. You can use cps= <base64 texture value> to use this. Alternatively, use cps= <username> to make a custom head using a players username. Note this may not be as efficient as using custom heads.
cpi= Used for panel custom items. Simply do cpi= <custom item> and it will change the material to the item. View the Panel Settings page and navigate to custom items for more information on how to make one of them.
oraxen= Add Oraxen custom items to your panels. Just use the following material template: oraxen= <itemName> For example: oraxen= crystal_shard
itemsadder= Add ItemsAdder custom items to your panels. Just use the following material template: itemsadder= <namespace:ID> For example: itemsadder= money:coin
hdb= Uses Head Database to add your head into the panel. Simply find a head in the database https://www.spigotmc.org/resources/14280/ and get its number. eg. hdb= <number>
mmo= Uses MMOItems to make an item in the panel slot. Just use the following material template: mmo= <item type> <id>
book= This will create a writable book item. book= <author> is how to use the tag, the author does not need to be a real username. Adding a section similar to the lore in your item but called "write" will become the contents of the book.
%cp-player-online-1% You can change the number 1, to any number, it will check server slots and find the player in that slot. If you are the only one online and use the number 1, It will show up as yourself. If you then make it 2, it will show offline, since there is only one player on the server. It will show the players head.

🔗 Item Type

This is where you can declare special types for items.

itemType:
- placeable #this will allow the player to take the item and place other items in this slot.
- noAttributes #this will hide the attributes of the items.
- dropItem #will make the item that is in the current slot always drop when the panel is closed
- returnItem #will make the item that is in the slot go back into the players inventory when the panel is closed

🔗 Item Name

The name of the item. If you would like the item to have no name/an empty name, you will need to name the item '&f'.

name: '&aSurvival'

🔗 Item Stack

How many are in the stack of the item. If this is removed from the item it will not be stacked.

stack: 1

🔗 Enchantments

Set to true, if you want the item to be enchanted. You can remove this to set it to false.

enchanted:
- true

You can also list multiple custom enchantments, find the example below:

enchanted:
- KNOCKBACK 2
- SHARPNESS 4

🔗 Item NBT Values

Add different NBT values to your item. A key and a value are required for every tag. In the example below, the key 'example' will be stored in the item and the value of 'example' will be 'test'.

The value should include the value type with the value separated by an underscore. The below example will create an NBT value which is a string with the content 'test'

Supported NBT types: string, integer, double, float, long, short, boolean, byte.

nbt:
    example: string_test

You can additionally structure your NBT values, as seen below.

nbt:
    stats:
        damage: long_6.5
        name: string_Dagger Item
        is_obtainable: boolean_true

🔗 Custom Model Data

Set the Custom Model Data value for the item to anything you would like.

customdata: 1000001

🔗 Item Damage

Set the amount of damage to an item. Setting this to -1 will make the item unbreakable.

damage: 10

🔗 Armour Colour

This will allow you to change armour colour if you have leather armour You can use an RGB colour, or you can find a specific colour from the spigot's API.

leatherarmor: 136,0,255
OR
leatherarmor: CYAN

🔗 Armour Trim

This will allow you to add armour trim to the armour. For example, trim: EMERALD COAST

trim: [Material] [Pattern]

🔗 Potion Effects

You can change your potion effect type by using the following figure in your item To view different potion names, find PotionType from spigot's API. You can use this for all items that can have potion effects (eg. tipped arrows).

potion: STRONG_HEALING

🔗 Item Lore

Add as many lines as you need, this is the item's lore. You can also use the \n symbol in order to create new lines instead.

lore:
- '&2Heal Yourself and'
- '&2change gamemode to survival.'

🔗 Multi Paywall

You can include multiple paywalls here. Any commands when the item is clicked will not be run unless these conditions are met. Items and money will not be taken from the player unless every condition is met. Any paywall can be used here, plus hasperm=.

multi-paywall:
- 'item-paywall= item'
- 'paywall= 100'

🔗 Item Commands

Commands that will execute when the user clicks the item, it will execute in order and if the player doesn't have permission to use a command, they will not be able to execute it. You can use Panel Command Tags in this section!

commands:
- 'heal'
- 'gamemode survival'

🔗 Player Input

Request the players input in chat and whatever the player types will be used in the placeholder %cp-player-input%. Item commands will run when the item is clicked as usual, player-input commands will run after the input was entered.

player-input:
- 'msg= you input %cp-player-input%'
- 'open= panelName'

🔗 Item Refresh Commands

Refresh commands will execute when the panel items refresh. If these commands are behind a Has Section, they will not run unless the Has Section parameters allow them to do so.

refresh-commands:
- 'cpc'
- 'msg= Closed due to inactivity!'

🔗 Duplicate Items

If you have an item that you want to duplicate across the panel, using the duplicate method will be the way to do it, simply add the below to your item to duplicate it. Keep in mind this will only duplicate the item visually and if there are commands in the item they will not work in the duplicated items. The below example will duplicate the item into the slots 0 to 9, the slot 13 and then slots 17 to 27.

duplicate: "0-9,13,17-27"

🔗 Custom Banners

To use custom banners, the first and easiest step would be to simply drag and drop a custom banner into the in-game editor. Otherwise, you can add a banner section to the panel item like this:

'1':
  material: RED_BANNER
  banner:
  - WHITE,STRIPE_MIDDLE
  - BLACK,SKULL

Using the PatternTypes, there is a list of different patterns that can be used. The order will be read from top to bottom for which pattern will be placed on the banner. The list can be expanded as long as you would like, as they will be in this format: COLOUR,PATTERN.