CustomInventoriesAPI 1.19

With this plugin you can create CustomInventories really really really easy.

  1. MaTaMoR_
    This is basically an API, not a libraby, you have to install it as a plugin in plugins folder, after add it as dependecy on your project and start coding, this plugin doesn't use any type of database so it's really fast, also it have a item builder to make the things easier...

    ------------ Updated ------------

    Source (Updated)

    Item builder :
    Code (Java):

    //Create the customItem
    CustomItem customItem = CustomItem.builder(Material.REDSTONE).setName("&cRedstone").build();
    //Conver the CustomItem to ItemStack
    ItemStack itemStack = customItem.build();
    //Since the API have variables you can also build the item like this to replace variables
    ItemStack itemStack = customItem.build(Player);
     
    Icons :
    Code (Java):

    //There are two types of Icons NormalIcon and Icon.

    //First NormalIcon, to create a NormalIcon we will need a CustomItem
    NormalIcon normalIcon = new NormalIcon(customItem);
    //We can also put on the constructor the click type
    NormalIcon normalIcon = new NormalIcon(customitem ,ClickType.LEFT_CLICK);
    //Add actions, the actions is what will happen when somebody click on the Icon, to add an action :
    normalIcon.addClickAction(new ClickAction() {
    @Override
    public void excute(Player player) {
      //Stuff
    }
    };

    //We can also set permission
    IPermission permission = new IPermission(plugin, "permission");
    //If we wanna make our permission a child from a existing permission
    IPermission permission = new IPermission(plugin, "permission", parent);

    normalIcon.setPermission(permission);

    //We can also set the visibility of the icon, ¿ what does this mean ? When a player opens the inventory and don't have the permission for the icon he won't be able to see the icon

    normalIcon.setVisibilityRestricted(true);

    //Icon, they main differente between NormalIcon and Icon is that when we intialize the Icon class we will have to implement an abstract method, also the constructor doesn't need a customItem.

    Icon icon = new Icon() {
    @Override
    public CustomItem getCustomItem(Player player) {
      return customItem;
    }
    };

    // When a player opens the inventory this will load the item, lets say we want to create an Icon with the player chestplate so we can easily do it like this, the icon will change depending on who opens the inventory.

    Icon icon = new Icon() {
    @Override
    public CustomItem getCustomItem(Player player) {
      return CustomItem.toCustomItem(player.getInventory.getChestplate());
    }
    };
     
    Create an inventory :
    Code (Java):

    //Create and Inventory and set an Icon
    CustomInventory inventory = new CustomInventory(Size.ONE_LINE, title);

    //Set an icon
    inventory.setIcon(position, normalIcon);

Recent Reviews

  1. Keffisor21
    Keffisor21
    5/5,
    Version: 1.17
    This API is AMAZING, with this API is very very very easy to create menus, 10/10 for the Dev
    1. MaTaMoR_
      Author's Response
      Thanks :D
  2. FexonTV2002
    FexonTV2002
    2/5,
    Version: 1.15
    whit soundskywars the chests are glichy example: when i remove armor and put it on the item will be invisible ...
  3. Aditya
    Aditya
    5/5,
    Version: 1.7
    Very good API, i'd love to see more features in this plugin in the future. This is one of the most clean and easy to use API. +1 to the dev!
    1. MaTaMoR_
      Author's Response
      Thanks, if you need any new featuring just tell me.