Skip to content
Hamza Coşkun edited this page Dec 9, 2023 · 12 revisions

Welcome to the ObliviateInvs wiki!

Beggining to using ObliviateInvs

Step 0

Are you beginner in Java?

If you're new in Java, research what are buildtool softwares. We're mostly use Maven or Gradle to manage our libraries. These informations should be enough to research. After learned them, use appropriate code below.

Maven

<repository>
    <id>jitpack.io</id>
    <url>https://jitpack.io</url>
</repository>

<dependency>
    <groupId>com.github.hamza-cskn.obliviate-invs</groupId>
    <artifactId>core</artifactId>
    <version>INSERT_VERSION_HERE</version>
</dependency>

Gradle

repositories {
    maven { url 'https://jitpack.io' }
}

dependencies {
    implementation 'com.github.hamza-cskn.obliviate-invs:core:INSERT_VERSION_HERE'
    //implementation 'com.github.hamza-cskn.obliviate-invs:configurablegui:INSERT_VERSION_HERE'
}

Step 1

Initalize the inventory API.

public class Test extends JavaPlugin {

	@Override
	public void onEnable() {
		new InventoryAPI(this).init();
	}

}

Step 2

Create your GUI class.

public class TestGui extends Gui {
	
	public TestGui(Player player) {
		super(player, "test-gui", "Test Title", 3);
		     //player, id, title, row
	}

        @Override
	public void onOpen(InventoryOpenEvent event) {
		addItem(0, new Icon(Material.STONE)));
		       //slot
	}
}

Step 3

Open your GUI to player.

new TestGui(player).open();

You've completed basic pieces! Visit other wiki pages.

Icon Usage

https://github.com/Obliviated/ObliviateInvs/wiki/Icons

Advanced Slots

https://github.com/Obliviated/ObliviateInvs/wiki/Advanced-Slots

Pagination

https://github.com/Obliviated/ObliviateInvs/wiki/Pagination