# Package net.axay.kspigot.items

## Types

CustomItemIdentifier
Link copied to clipboard
data class CustomItemIdentifier(customModelData: Int, placeHolderMaterial: Material)
Content copied to clipboard
This class defines a material in combination with a specific custom model data value.
ItemMetaLoreBuilder
Link copied to clipboard
class ItemMetaLoreBuilder
Content copied to clipboard
Lore builder which uses an ArrayList under the hood.

## Functions

addLore
Link copied to clipboard
inline fun ItemMeta.addLore(builder: ItemMetaLoreBuilder.() -> Unit)
Content copied to clipboard
Adds new lines to the lore (description) of the item.
flag
Link copied to clipboard
fun ItemMeta.flag(itemFlag: ItemFlag)
Content copied to clipboard
Add a new ItemFlag to the item flags.
flags
Link copied to clipboard
fun ItemMeta.flags(vararg itemFlag: ItemFlag)
Content copied to clipboard
Add several ItemFlags to the item flags.
itemMeta
Link copied to clipboard
inline fun <T : ItemMeta> itemMeta(material: Material, builder: T.() -> Unit): T?
Content copied to clipboard
Creates new a ItemMeta instance of the given material and opens a builder for it.
@JvmName(name = "simpleItemMeta")
inline fun itemMeta(material: Material, builder: ItemMeta.() -> Unit): ItemMeta?
Content copied to clipboard
itemStack
Link copied to clipboard
inline fun itemStack(material: Material, builder: ItemStack.() -> Unit): ItemStack
Content copied to clipboard
Creates a new ItemStack and opens a builder for it.
meta
Link copied to clipboard
inline fun <T : ItemMeta> ItemStack.meta(builder: T.() -> Unit)
Content copied to clipboard
Opens a builder with the current meta.
@JvmName(name = "simpleMeta")
inline fun ItemStack.meta(builder: ItemMeta.() -> Unit)
Content copied to clipboard
removeFlag
Link copied to clipboard
fun ItemMeta.removeFlag(itemFlag: ItemFlag)
Content copied to clipboard
Removes a ItemFlag from the item flags.
removeFlags
Link copied to clipboard
fun ItemMeta.removeFlags(vararg itemFlag: ItemFlag)
Content copied to clipboard
Removes several ItemFlags from the item flags.
setLore
Link copied to clipboard
inline fun ItemMeta.setLore(builder: ItemMetaLoreBuilder.() -> Unit)
Content copied to clipboard
Sets the lore (description) of the item.
setMeta
Link copied to clipboard
inline fun <T : ItemMeta> ItemStack.setMeta(builder: T.() -> Unit)
Content copied to clipboard
Resets the meta and opens a builder to create the new one.
@JvmName(name = "simpleSetMeta")
inline fun ItemStack.setMeta(builder: ItemMeta.() -> Unit)
Content copied to clipboard
toLoreList
Link copied to clipboard
fun String.toLoreList(lineLength: Int = 40, lineColor: ChatColor = KColors.RESET): List<String>
Content copied to clipboard
Converts this string into a list of strings, which can be used for minecraft lorelists.

## Properties

customModel
Link copied to clipboard
var ItemMeta.customModel: Int?
Content copied to clipboard
Provides safe access to the items' customModelData.
lengthWithoutMinecraftColour
Link copied to clipboard
val CharSequence.lengthWithoutMinecraftColour: Int
Content copied to clipboard
Returns the length of this sequence, ignoring all minecraft colour codes.
localName
Link copied to clipboard
var ItemMeta.localName: String
Content copied to clipboard
Provides more consistent access to the items' localizedName.
name
Link copied to clipboard
var ItemMeta.name: String?
Content copied to clipboard
Provides safe access to the items' displayName.