Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/screamingsandals/simpleinventories

Simple tree gui generator for Spigot plugins!
https://github.com/screamingsandals/simpleinventories

bukkit gui library shop

Last synced: about 2 months ago
JSON representation

Simple tree gui generator for Spigot plugins!

Awesome Lists containing this project

README

        

# SimpleInventories

SimpleInventories used is small library for making guis in minecraft! It's also available as plugin.

[![Simple Inventories CI](https://github.com/ScreamingSandals/SimpleInventories/actions/workflows/gradle.yml/badge.svg)](https://github.com/ScreamingSandals/SimpleInventories/actions/workflows/gradle.yml)

Look into our wiki: https://github.com/ScreamingSandals/SimpleInventories/wiki

## How to use
1. Import maven repository
```xml

screaming-repo
https://repo.screamingsandals.org/

```
2. Include dependency
```xml

org.screamingsandals.simpleinventories
SimpleInventories-Core
LATEST_VERSION_HERE
compile

```
3. Use in code
```java

import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.Player;

import org.screamingsandals.simpleinventories.material.builder.ItemFactory;
import org.screamingsandals.simpleinventories.bukkit.SimpleInventoriesBukkit;

public class Sample extends JavaPlugin {

private InventorySet inventorySet;

public void onEnable() {

SimpleInventoriesBukkit.init(this);

inventorySet = SimpleInventoriesBukkit.builder()
.render(itemRenderEvent -> {

})
.preClick(preClickEvent -> {

})
.click(clickEvent -> {

})
.categoryOptions(options ->
options.backItem(ItemFactory.build(someItemStack1))
.pageBackItem(ItemFactory.build(someItemStack2))
.pageForwardItem(ItemFactory.build(someItemStack3))
.cosmeticItem(ItemFactory.build(someItemStack4))
)
.include("myAwesomeGui.yml")
.process();
}

public void show(Player player) {
SimpleInventoriesBukkit.wrapPlayer(player).openInventory(inventorySet);
}
}
```
4. Relocate package
```xml



org.apache.maven.plugins
maven-shade-plugin


package

shade




org.screamingsandals.simpleinventories
${project.groupId}.si






```
5. Now build your plugin and enjoy it!
`mvn install`