This is Minecraft Paper API Plugin for Groovy
- Create item
- Create custom item
This API uses the GPL-3.0 open source license.
- License: CreateItem License
This is a dependency library, you must add this API to use the plugin using this dependency library. To use a plugin using this dependency library, you need to do the following:
- Step 1: Please go to your server.
- Step 2: Please add this dependency library to your plugins folder.
If you did the above, you can use the plugin using this dependency.
- Maven
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependency>
<groupId>com.github.ProjectTL12345</groupId>
<artifactId>CreateItem</artifactId>
<version>VERSION</version>
</dependency>
- Gradle (Groovy DSL)
repositories {
jcenter()
maven {
url = 'https://jitpack.io'
}
}
dependencies {
compileOnly 'com.github.ProjectTL12345:CreateItem:VERSION'
}
- Gradle (Kotlin DSL)
repositories {
jcenter()
maven("https://jitpack.io")
}
dependencies {
jcenter()
compileOnly("com.github.ProjectTL12345:CreateItem:VERSION")
}
- Java
public void onExample(Player targetPlayer) {
CreateItem item = new CreateItem();
item.addItem(Material.DIAMOND_SWORD, 1, targetPlayer);
}
- Groovy
void onExample(Player targetPlayer) {
CreateItem item = new CreateItem()
item.addItem(Material.DIAMOND_SWORD, 1, targetPlayer)
}
- Kotlin
fun onExample(targetPlayer: Player) {
val item = CreateItem()
item.addItem(Material.DIAMOND_SWORD, 1, targetPlayer)
}
- Scala
fun onExample(targetPlayer: Player): Unit = {
val item = CreateItem()
item.addItem(Material.DIAMOND_SWORD, 1, targetPlayer)
}
- Java
public void onExample(Player targetPlayer) {
CreateItem item = new CreateItem();
item.addCustomItem(Material.DIAMOND_SWORD, 1, targetPlayer, ChatColor.GREEN + "Test", null");
}
- Groovy
void onExample(Player targetPlayer) {
CreateItem item = new CreateItem()
item.addCustomItem(Material.DIAMOND_SWORD, 1, targetPlayer, "${ChatColor.GREEN}Test", null") // Parentheses can be omitted
}
- Kotlin
fun onExample(targetPlayer: Player) {
val item = CreateItem()
item.addCustomItem(Material.DIAMOND_SWORD, 1, targetPlayer, "${ChatColor.GREEN}Test", null")
}
- Scala
fun onExample(targetPlayer: Player): Unit = {
val item = CreateItem()
item.addCustomItem(Material.DIAMOND_SWORD, 1, targetPlayer, "${ChatColor.GREEN}Test", null")
}