-
Notifications
You must be signed in to change notification settings - Fork 18
Home
Hamza Coşkun edited this page Dec 21, 2022
·
12 revisions
Welcome to the ObliviateInvs wiki!
Initalize the inventory API.
public class Test extends JavaPlugin {
@Override
public void onEnable() {
new InventoryAPI(this).init();
}
}
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
}
}
Open your GUI to player.
new TestGui(player).open();
You've completed basic pieces! Visit other wiki pages.
https://github.com/Obliviated/ObliviateInvs/wiki/Icons
https://github.com/Obliviated/ObliviateInvs/wiki/Advanced-Slots