Update formatting
This commit is contained in:
@@ -37,4 +37,4 @@ data class CustomItemIdentifier(val customModelData: Int, val placeHolderMateria
|
||||
itemStack
|
||||
} else null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -61,4 +61,4 @@ val CharSequence.lengthWithoutMinecraftColour: Int
|
||||
}
|
||||
|
||||
return count
|
||||
}
|
||||
}
|
||||
|
@@ -6,15 +6,11 @@ import org.bukkit.inventory.ItemFlag
|
||||
import org.bukkit.inventory.ItemStack
|
||||
import org.bukkit.inventory.meta.ItemMeta
|
||||
|
||||
/*
|
||||
ITEM STACK
|
||||
*/
|
||||
// creation
|
||||
/**
|
||||
* Creates a new [ItemStack] and opens a builder for it.
|
||||
*/
|
||||
inline fun itemStack(material: Material, builder: ItemStack.() -> Unit) = ItemStack(material).apply(builder)
|
||||
// extensions
|
||||
|
||||
/**
|
||||
* Opens a builder with the current meta.
|
||||
* @param T the specific type of the meta
|
||||
@@ -44,10 +40,7 @@ inline fun <reified T : ItemMeta> ItemStack.setMeta(builder: T.() -> Unit) {
|
||||
/** @see setMeta */
|
||||
@JvmName("simpleSetMeta")
|
||||
inline fun ItemStack.setMeta(builder: ItemMeta.() -> Unit) = setMeta<ItemMeta>(builder)
|
||||
/*
|
||||
ITEM META
|
||||
*/
|
||||
// creation
|
||||
|
||||
/**
|
||||
* Creates new a [ItemMeta] instance of the given material and opens a builder for it.
|
||||
* @param T the specific type of the meta
|
||||
@@ -60,7 +53,7 @@ inline fun <reified T : ItemMeta> itemMeta(material: Material, builder: T.() ->
|
||||
/** @see itemMeta */
|
||||
@JvmName("simpleItemMeta")
|
||||
inline fun itemMeta(material: Material, builder: ItemMeta.() -> Unit) = itemMeta<ItemMeta>(material, builder)
|
||||
// extensions
|
||||
|
||||
/**
|
||||
* Sets the lore (description) of the item.
|
||||
*/
|
||||
@@ -127,4 +120,4 @@ var ItemMeta.customModel: Int?
|
||||
*/
|
||||
var ItemMeta.localName: String
|
||||
get() = localizedName
|
||||
set(value) = setLocalizedName(value)
|
||||
set(value) = setLocalizedName(value)
|
||||
|
Reference in New Issue
Block a user