Package net.axay.kspigot.items

Types

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

Functions

addLore
Link copied to clipboard
inline fun ItemMeta.addLore(builder: ItemMetaLoreBuilder.() -> Unit)
Adds new lines to the lore (description) of the item.
flag
Link copied to clipboard
fun ItemMeta.flag(itemFlag: ItemFlag)
Add a new ItemFlag to the item flags.
flags
Link copied to clipboard
fun ItemMeta.flags(vararg itemFlag: ItemFlag)
Add several ItemFlags to the item flags.
itemMeta
Link copied to clipboard
inline fun <T : ItemMeta> itemMeta(material: Material, builder: T.() -> Unit): T?
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?
itemStack
Link copied to clipboard
inline fun itemStack(material: Material, builder: ItemStack.() -> Unit): ItemStack
Creates a new ItemStack and opens a builder for it.
meta
Link copied to clipboard
inline fun <T : ItemMeta> ItemStack.meta(builder: T.() -> Unit)
Opens a builder with the current meta.
@JvmName(name = simpleMeta)
inline fun ItemStack.meta(builder: ItemMeta.() -> Unit)
removeFlag
Link copied to clipboard
fun ItemMeta.removeFlag(itemFlag: ItemFlag)
Removes a ItemFlag from the item flags.
removeFlags
Link copied to clipboard
fun ItemMeta.removeFlags(vararg itemFlag: ItemFlag)
Removes several ItemFlags from the item flags.
setLore
Link copied to clipboard
inline fun ItemMeta.setLore(builder: ItemMetaLoreBuilder.() -> Unit)
Sets the lore (description) of the item.
setMeta
Link copied to clipboard
inline fun <T : ItemMeta> ItemStack.setMeta(builder: T.() -> Unit)
Resets the meta and opens a builder to create the new one.
@JvmName(name = simpleSetMeta)
inline fun ItemStack.setMeta(builder: ItemMeta.() -> Unit)
toLoreList
Link copied to clipboard
fun String.toLoreList(vararg lineColors: ChatColor = arrayOf(KColors.RESET), lineLength: Int = 40): List<String>
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?
Provides safe access to the items' customModelData.
lengthWithoutMinecraftColour
Link copied to clipboard
val CharSequence.lengthWithoutMinecraftColour: Int
Returns the length of this sequence, ignoring all minecraft colour codes.
localName
Link copied to clipboard
var ItemMeta.localName: String
Provides more consistent access to the items' localizedName.
name
Link copied to clipboard
var ItemMeta.name: String?
Provides safe access to the items' displayName.