Advertisement
Guest User

InventoryMain

a guest
Feb 5th, 2020
157
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package me.LobbyBrain.Inventory;
  2.  
  3. import fr.minuskube.inv.SmartInventory;
  4.  
  5. public class InventoryMain {
  6.    
  7.     static SetupPlugin sp = new SetupPlugin();
  8.     public static String inventory;
  9.     public static String inventory2;
  10.     public static SmartInventory inv;
  11.     @SuppressWarnings({ "static-access"})
  12.     public static SmartInventory INV() {
  13.         for(String itemkey : sp.plugin.getInventoryFile().getConfigurationSection("LobbyBrain.DefaultInventory").getKeys(false)) {
  14.                 if(sp.plugin.getInventoryFile().getString("LobbyBrain.DefaultInventory."+itemkey+".TYPE").contains("OPEN-MENU")) {
  15.                     inventory = sp.plugin.getInventoryFile().getString("LobbyBrain.DefaultInventory."+itemkey+".MENU");
  16.                     inv = SmartInventory.builder()
  17.                             .title(sp.plugin.getMenuFile().getString("LobbyBrain.Menus."+inventory+".Title"))
  18.                             .size(3, 9)
  19.                             .provider(new me.LobbyBrain.Inventory.InventoryProvider())
  20.                             .build();
  21.                     break;
  22.                 }
  23.         }
  24.         return inv;
  25.     }
  26.     @SuppressWarnings("static-access")
  27.     public static SmartInventory INV2() {
  28.         for(String itemkey : sp.plugin.getMenuFile().getConfigurationSection("LobbyBrain.Menus."+inventory2+".Items").getKeys(false))
  29.         return SmartInventory.builder()
  30.                 .title(sp.plugin.getMenuFile().getString("LobbyBrain.Menus."+inventory2+".Title"))
  31.                 .size(sp.plugin.getMenuFile().getInt("LobbyBrain.Menus."+inventory2+".Size"), 9)
  32.                 .provider(new me.LobbyBrain.Inventory.InventoryProvider())
  33.                 .build();
  34.         return inv;
  35.     }
  36. }
Advertisement
RAW Paste Data Copied
Advertisement