Sueta
IN

Inventory API

1.0.0

Simpler way to manage your inventories

·Plugin

Inventory API

What is that API?

This is a new way to manage your inventories, with harder better faster and stonger techniques, that it!

How do I use that?

This is very simple:

CInventory inventory = new CInventory(size, name, id);
// Or
CInventory inventory = new CInventory(size, name, id, fill_void);
// Create an inventory. ID is needed later, fill_void is to fill with hidden items

// Open the inventory to a player
InventoryAPI.openInventory(player, inventory);

// Close an inventory
InventoryAPI.closeInventory(player);

// Get opened inventory, returns null if none
CInventory inventory = InventoryAPI.getOpenedInventory(player);

// Check if an item is clean (no name, lore, etc)
boolean blank = InventoryAPI.isItemBlank(itemStack);


Now, if you want to get CInventory infos:

// Get vanilla inventory
Inventory vanillaInv = inventory.getInventory();

// Get inventory ID
String id = inventory.getID();

// Fill inventory with empty
inventory.fillVoid();

// All the others methods are inherited from Inventory vanilla class


That it! Tell me if a version, other than 1.13, is working!

Similar projects

Plugin →