ItemHelper
Use API
Maven
<repositories>
<repository>
<id>project-centralid>
<url>https://repo.projecttl.net/repository/maven-public/url>
repository>
repositories>
<dependency>
<groupId>io.github.blugon09groupId>
<artifactId>ItemHelperartifactId>
<version>VERSIONversion>
dependency>
Gradle
repositories {
...
maven { 'https://repo.projecttl.net/repository/maven-public/' }
}
dependencies {
implementation 'io.github.blugon09:ItemHelper:VERSION'
}
Kotlin DSL
repositories {
...
maven("https://repo.projecttl.net/repository/maven-public/")
}
dependencies {
implementation("io.github.blugon09:ItemHelper:VERSION")
}
Create ItemObject
val itemObject : ItemObject = ItemObject(Material, Amount, DisplayName, Lore)
//Build to ItemStack
val itemStack : ItemStack = itemObject.build()
Change ItemStack Info
val itemObject : ItemObject = player.inventory.itemInMainHand.asItemObject()
itemObject.displayName = "String.component()로 String을 TextComponent로 간단하게 변경".component()
itemObject.addLore("Lore!".component())
itemObject.lore = arrayListOf("Lore2!".component(), "Lore3!".component())
해당 API는 현재 개발중인 SNAPSHOT버전이며 언제든지 생성 방식이 바뀔수 있습니다(근데 웬만하면 안바뀔듯)