Skip to content

GliczDev/GlitchInventoryAPI

Repository files navigation

GlitchInventoryAPI CodeFactor

discord-plural paper

Supported versions

This API supports all versions >= 1.20.6!

Adding dependency

Maven

Repository

Releases

<repository>
  <id>roxymc-releases</id>
  <name>RoxyMC Repository</name>
  <url>https://repo.roxymc.net/releases</url>
</repository>

Snapshots

<repository>
  <id>roxymc-snapshots</id>
  <name>RoxyMC Repository</name>
  <url>https://repo.roxymc.net/snapshots</url>
</repository>

Dependency

<dependency>
  <groupId>me.glicz</groupId>
  <artifactId>inventoryapi-api</artifactId>
  <version>VERSION</version>
</dependency>

Gradle

Repository

Releases

maven {
    name = "roxymcReleases"
    url = uri("https://repo.roxymc.net/releases")
}

Snapshots

maven {
    name = "roxymcSnapshots"
    url = uri("https://repo.roxymc.net/snapshots")
}

Dependency

dependencies {
    implementation("me.glicz:inventoryapi-api:VERSION")
}

Shading

If you want to shade this API into your plugin, you have to load it in onEnable()

@Override
public void onEnable() {
    GlitchInventoryAPI.init(new GlitchInventoryAPIImpl(GlitchInventoryAPIConfig.create(this)));
}

Usage

Basic example

GlitchInventory.simple(3) // Create simple inventory with 3 rows (Bukkit InventoryType can be also used)
    .title(Component.text("GlitchInventoryAPI")) // Set title to GlitchInventoryAPI
    .item(10, ItemBuilder.itemBuilder(Material.STONE).asGuiItem(e -> {
        e.player().sendMessage("Simple GUI created with GlitchInventoryAPI!");
    })) // Set slot to stone item with click action
    .open(player); // Open inventory to player

About

Lightweight inventory API ✨

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages