Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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!
- Host: GitHub
- URL: https://github.com/screamingsandals/simpleinventories
- Owner: ScreamingSandals
- License: apache-2.0
- Created: 2019-04-02T14:55:53.000Z (almost 6 years ago)
- Default Branch: v2.0
- Last Pushed: 2024-06-23T13:01:58.000Z (6 months ago)
- Last Synced: 2024-06-23T14:24:43.385Z (6 months ago)
- Topics: bukkit, gui, library, shop
- Language: Java
- Homepage:
- Size: 705 KB
- Stars: 12
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
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
```xmlscreaming-repo
https://repo.screamingsandals.org/```
2. Include dependency
```xmlorg.screamingsandals.simpleinventories
SimpleInventories-Core
LATEST_VERSION_HERE
compile```
3. Use in code
```javaimport 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`