SimpleInventoryManager (SimAPI) 1.0

A simple inventory manager API to improve inventory creation.

  1. mentor6561
    What does it do?

    The inventory manager plugin features many more exciting elements to improve the development of inventory in your own plugin. With this API you can create inventory quickly, and interact with them.

    How to use ?

    In the main class:
    Code (Text):
    SimAPI simAPI;
    public void onEnable() {
        simAPI = SimAPI.getApi();
    }
    To add a new Inventory to your plugin, you need to create a new Class extends SimInventory:

    Code (Text):
    public class Example extends SimInventory {

        public Example() {
            super(InventoryType.HOPPER, "Example");
        }

        @Override
        public void registerItems() {
            setItem(1, new SimItem().createItem(Material.IRON_INGOT).setName("§fIron !!"));
            setItem(2, new SimItem().createItem(Material.GOLD_INGOT).setName("§6Gold !!"));
            setItem(3, new SimItem().createItem(Material.DIAMOND).setName("§bDiamond !!"));
            // The class SimItem is a custom item class, to allow you create Item faster !
        }

        @Override
        public void onClick(Player player, int slot, ItemStack item) { // Call when the player click on the inventory.
            player.sendMessage("§7You've get an " + item.getItemMeta().getDisplayName());
            player.getInventory().addItem(item);
        }

    }
    Now, you need to tell the plugin, than the custom inventory is exist:

    Code (Text):
    simAPI.registerNewInventory("exampleinventory", new Example());
    Now, you can open the custom inventory like this:

    Code (Text):
    simAPI.getInventory("exampleinventory").open(player);
    And thats all ! Now just try yourself.

    Command Features:
    /sim >> Show current version of the API (Console and player)
    /sim <v/ver/version> >> Show current version of the API (Console and player)
    /sim <h/help/?> >> Show the help page (Console and player)
    /sim example >> (Player)
    Command Permissions:
    No permission available now. (Implemented in future update)
    Future additions:
    Permission for commands and inventory
    A config file to allow inventory creation without any other plugin.
    Tell me if you want another additions...


    Thank you, and hope my plugin help you.

Recent Updates

  1. Some fixes