Package-level declarations

Types

Link copied to clipboard
object ItemUtils
Link copied to clipboard
object ToolUtils

Properties

Link copied to clipboard
val ItemStack.craftingRemainingItem: ItemStack

The ItemStack that remains in the crafting slots after using it in a recipe. Empty if there is no remaining item.

Link copied to clipboard
val Material.fluidType: FluidType?
Link copied to clipboard
val Material.localizedName: String?
Link copied to clipboard
Link copied to clipboard
val ItemStack.novaItem: NovaItem?

The NovaItem of this, or null if it's not one.

val ItemStack.novaItem: NovaItem?

The NovaItem of this, or null if it's not one.

Link copied to clipboard
val Material?.requiresLight: Boolean
Link copied to clipboard
val Material.soundGroup: SoundGroup

Functions

Link copied to clipboard
fun ItemStack.clearCustomModelDataColor(index: Int)

Clears the CustomModelData.colors at the given index either removing the element (if it is at the end of the list) or setting it to DEFAULT_COLOR.

Link copied to clipboard
fun ItemStack.clearCustomModelDataColors(offset: Int, length: Int)

Clears the range from [offset, offset + length) in the CustomModelData.colors either removing the elements (if they are at the end of the list) or setting them to DEFAULT_COLOR.

Link copied to clipboard
fun ItemStack.clearCustomModelDataFlag(index: Int)

Clears the CustomModelData.flags at the given index either removing the element (if it is at the end of the list) or setting it to DEFAULT_FLAG.

Link copied to clipboard
fun ItemStack.clearCustomModelDataFlags(offset: Int, length: Int)

Clears the range from [offset, offset + length) in the CustomModelData.flags either removing the elements (if they are at the end of the list) or setting them to DEFAULT_FLAG.

Link copied to clipboard
fun ItemStack.clearCustomModelDataFloat(index: Int)

Clears the CustomModelData.floats at the given index either removing the element (if it is at the end of the list) or setting it to DEFAULT_FLOAT.

Link copied to clipboard
fun ItemStack.clearCustomModelDataFloats(offset: Int, length: Int)

Clears the range from [offset, offset + length) in the CustomModelData.floats either removing the elements (if they are at the end of the list) or setting them to DEFAULT_FLOAT.

Link copied to clipboard
fun ItemStack.clearCustomModelDataString(index: Int)

Clears the CustomModelData.strings at the given index either removing the element (if it is at the end of the list) or setting it to DEFAULT_STRING.

Link copied to clipboard
fun ItemStack.clearCustomModelDataStrings(offset: Int, length: Int)

Clears the range from [offset, offset + length) in the CustomModelData.strings either removing the elements (if they are at the end of the list) or setting them to DEFAULT_STRING.

Link copied to clipboard
fun ItemStack.damage(amount: Int, world: World): ItemStack?

Damages the this by amount and returns the resulting ItemStack, which may be null if the item broke.

Link copied to clipboard
Link copied to clipboard
fun Material.isCauldron(): Boolean
Link copied to clipboard
fun Material.isFluid(): Boolean
Link copied to clipboard
fun Material.isGlass(): Boolean
Link copied to clipboard
fun ItemStack?.isNotNullOrEmpty(): Boolean

Returns true if this is neither null, nor an empty item stack, otherwise returns false.

Link copied to clipboard
fun ItemStack?.isNullOrEmpty(): Boolean

Returns true if this is either null or an empty item stack, otherwise returns false.

Link copied to clipboard
fun Material.isTraversable(): Boolean
Link copied to clipboard
fun Material.playPlaceSoundEffect(location: Location)
Link copied to clipboard
inline fun <T : Any> ItemStack.retrieveData(key: Key): T?
inline fun <T : Any> ItemStack.retrieveData(key: Key): T?
inline fun <T : Any> ItemStack.retrieveData(namespace: String, key: String): T?
inline fun <T : Any> ItemStack.retrieveData(addon: Addon, key: String): T?
inline fun <T : Any> ItemStack.retrieveData(namespace: String, key: String): T?
inline fun <T : Any> ItemStack.retrieveData(addon: Addon, key: String): T?
Link copied to clipboard
fun ItemStack.setCustomModelDataColor(index: Int, value: Color)

Sets the CustomModelData.colors at the given index to value. Fills all intermediary indices with DEFAULT_COLOR if necessary.

Link copied to clipboard
fun ItemStack.setCustomModelDataColors(offset: Int, patch: List<Color>)

Overrides the range from [offset, offset + patch.size) in the CustomModelData.colors list with the values from patch. Fills all intermediary indices with DEFAULT_COLOR if necessary.

Link copied to clipboard
fun ItemStack.setCustomModelDataFlag(index: Int, value: Boolean)

Sets the CustomModelData.flags at the given index to value. Fills all intermediary indices with DEFAULT_FLAG if necessary.

Link copied to clipboard
fun ItemStack.setCustomModelDataFlags(offset: Int, patch: List<Boolean>)

Overrides the range from [offset, offset + patch.size) in the CustomModelData.flags list with the values from patch. Fills all intermediary indices with DEFAULT_FLAG if necessary.

Link copied to clipboard
fun ItemStack.setCustomModelDataFloat(index: Int, value: Float)

Sets the CustomModelData.floats at the given index to value. Fills all intermediary indices with DEFAULT_FLOAT if necessary.

Link copied to clipboard
fun ItemStack.setCustomModelDataFloats(offset: Int, patch: List<Float>)

Overrides the range from [offset, offset + patch.size) in the CustomModelData.floats list with the values from patch. Fills all intermediary indices with DEFAULT_FLOAT if necessary.

Link copied to clipboard
fun ItemStack.setCustomModelDataString(index: Int, value: String)

Sets the CustomModelData.strings at the given index to value. Fills all intermediary indices with DEFAULT_STRING if necessary.

Link copied to clipboard
fun ItemStack.setCustomModelDataStrings(offset: Int, patch: List<String>)

Overrides the range from [offset, offset + patch.size) in the CustomModelData.strings list with the values from patch. Fills all intermediary indices with DEFAULT_STRING if necessary.

Link copied to clipboard
inline fun <T : Any> ItemStack.storeData(key: Key, data: T?)
inline fun <T : Any> ItemStack.storeData(key: Key, data: T?)
inline fun <T : Any> ItemStack.storeData(namespace: String, key: String, data: T?)
inline fun <T : Any> ItemStack.storeData(addon: Addon, key: String, data: T?)
inline fun <T : Any> ItemStack.storeData(namespace: String, key: String, data: T?)
inline fun <T : Any> ItemStack.storeData(addon: Addon, key: String, data: T?)
Link copied to clipboard
fun ItemStack.takeUnlessEmpty(): ItemStack?

Returns null if this is empty, otherwise returns this.

Link copied to clipboard
fun Material.toItemStack(amount: Int = 1): ItemStack