This is Minecraft paper gui library.
- DSL style code
- Modular inventory gui with no event declaration required
This API uses the GPL-3.0 open source license.
- License: InventoryGUI License
- Maven
<repositories>
<repository>
<releases>
<enabled>true</enabled>
</releases>
<id>central</id>
<url>https://repo.maven.apache.org/maven2</url>
</repository>
</repositories>
<dependency>
<groupId>net.projecttl</groupId>
<artifactId>InventoryGUI-api</artifactId>
<version>VERSION</version>
</dependency>
- Gradle (Groovy DSL)
repositories {
mavenCentral()
}
dependencies {
compileOnly 'net.projecttl:InventoryGUI-api:VERSION'
}
- Gradle (Kotlin DSL)
repositories {
mavenCentral()
}
dependencies {
compileOnly("net.projecttl:InventoryGUI-api:VERSION")
}
Do not shade it! This can installed without shade (latest only feature)!
- Plugin.YML (latest only)
# ...
libraries:
- net.projecttl.InventoryGUI-api:VERSION
# ...
This api must use kotlin only. (you can use java but it will be hard.)
class TestGui(val plugin: JavaPlugin) {
fun inventory(player: Player) {
player.gui(plugin, InventoryType.CHEST_27, Component.text("TestGUI")) {
slot(0, ItemStack(Material.GRASS_BLOCK)) {
player.sendMessage("Hello!")
}
// dummy slot
slot(1, ItemStack(Material.IRON_INGOT))
}
}
}