⚠️ OUTDATED. See: https://github.com/GliczDev/GlitchInventoryAPI
This API supports all versions >= 1.17.1!
If you want to always use the latest commit build, please use
*branch*-SNAPSHOT
instead of version tag
Maven
Repository
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
Dependency
<dependency>
<groupId>com.github.GliczDev</groupId>
<artifactId>GlitchInventoryAPI</artifactId>
<version>TAG</version>
</dependency>
Gradle (Kotlin DSL)
Repository
repositories {
maven("https://jitpack.io")
}
Dependency
dependencies {
implementation("com.github.GliczDev:GlitchInventoryAPI:TAG")
}
Gradle (Groovy DSL)
Repository
repositories {
maven { url 'https://jitpack.io' }
}
Dependency
dependencies {
implementation 'com.github.GliczDev:GlitchInventoryAPI:TAG'
}
If you want to shade this API into your plugin, you have to load it in onEnable()
@Override
public void onEnable() {
GlitchInventoryAPI.load(this);
}
GlitchInventory.simple(3) //Create simple inventory with 3 rows (Bukkit InventoryType can be also used)
.setTitle(Title.simple("GlitchInventoryAPI") //Set title to GlitchInventoryAPI
.setItem(10, ItemBuilder.of(Material.STONE)
.asGuiItem(e -> {
e.getPlayer().sendMessage("Simple GUI created with GlitchInventoryAPI!")
})) //Set slot to stone item with click action
.open(player); //Open inventory to player
- Simple (
GlitchInventory.simple()
) - a normal inventory - Paginated (
GlitchInventory.paginated()
) - a paginated inventory - Merchant (
GlitchInventory.merchant()
) - a merchant inventory
- Simple (
Title.simple()
) - a normal title - Animated (
Title.animated()
) - an animated title //Soon - Random (
Title.random()
) - a randomly animated title //Soon