Sueta

GuiMaker

v2.0

Creates guis from looking at a chest!

·Plugin

Although not tested below 1.13, it should work from 1.8-1.15

Creating GUIS

Setup

First, Construct your GUI in a chest

Screen Shot 2020-04-15 at 12.15.31 PM.png

Then look at the chest

Screen Shot 2020-04-15 at 12.45.21 PM.png

and run
Screen Shot 2020-04-15 at 12.44.08 PM.png

Then locate your plugins folder

and find the folder "GuiMaker"

Screen Shot 2020-04-15 at 12.17.07 PM.png

Then locate the file

Screen Shot 2020-04-15 at 12.17.26 PM.png

it should look something like this:

Code
public Inventory createInventory_3() {
  Inventory inv = Bukkit.createInventory(null, 54, "Chest");
  ItemStack item0 = new ItemStack(Material.YELLOW_STAINED_GLASS_PANE,1);
    ItemMeta im0 = item0.getItemMeta();
      im0.setDisplayName("§8");
      im0.addItemFlags(ItemFlag.HIDE_ENCHANTS);
    item0.setItemMeta(im0);;
  ItemStack item1 = new ItemStack(Material.LIME_STAINED_GLASS_PANE,1);
    ItemMeta im1 = item1.getItemMeta();
      im1.setDisplayName("§8");
      im1.addItemFlags(ItemFlag.HIDE_ENCHANTS);
    item1.setItemMeta(im1);;
  ItemStack item2 = new ItemStack(Material.RED_STAINED_GLASS_PANE,1);
    ItemMeta im2 = item2.getItemMeta();
      im2.setDisplayName("§8");
      im2.addItemFlags(ItemFlag.HIDE_ENCHANTS);
    item2.setItemMeta(im2);;
  ItemStack item3 = new ItemStack(Material.IRON_ORE, 1, (short)0);
    ItemMeta im3 = item3.getItemMeta();
      im3.setDisplayName("§aClick to edit blocks");
      im3.addItemFlags(ItemFlag.HIDE_ENCHANTS);
    item3.setItemMeta(im3);;
  ItemStack item4 = new ItemStack(Material.WRITABLE_BOOK, 1, (short)0);
    ItemMeta im4 = item4.getItemMeta();
      im4.setDisplayName("§3Click to edit permissions");
      im4.addItemFlags(ItemFlag.HIDE_ENCHANTS);
    item4.setItemMeta(im4);;
  ItemStack item5 = new ItemStack(Material.STONE, 1, (short)0);
    ItemMeta im5 = item5.getItemMeta();
      im5.setDisplayName("§bClick to add blocks");
      im5.addItemFlags(ItemFlag.HIDE_ENCHANTS);
    item5.setItemMeta(im5);;
  ItemStack item6 = new ItemStack(Material.CLOCK, 1, (short)0);
    ItemMeta im6 = item6.getItemMeta();
      im6.setDisplayName("§cClick to edit reset timings");
      im6.addItemFlags(ItemFlag.HIDE_ENCHANTS);
    item6.setItemMeta(im6);;
  for(int i : Arrays.asList(1,2,3,4,5,6,7,10,16,19,25,28,34,37,43,46,47,48,49,50,51,52)) {
    inv.setItem(i, item1);
  }
  for(int i : Arrays.asList(0,8,9,17,18,26,27,35,36,44,45,53)) {
    inv.setItem(i, item0);
  }
  for(int i : Arrays.asList(11,12,13,14,15,21,23,29,30,31,32,33,38,39,41,42)) {
    inv.setItem(i, item11);
  }
  inv.setItem(24, item24);
  inv.setItem(20, item20);
  inv.setItem(22, item22);
  inv.setItem(40, item40);
  return inv;
}

Command: /makegui
Command: /edititem name/lore <name/lore...>

Permissions: guimaker.create
Permissions: edititem.use

You can setup custom ItemBuilders in the config, it's not recommended but it's there, I have one named Development to use these Configurations, run the command like so:
/makegui <ConfigSectionName>

if you've done something wrong in the configuration, it will yell at you in console and if it doesn't yell at you, it will show up messed up in the .java

DefaultConfig
formats:
  Development:
    itemclassName: 'ItemBuilder'
    creation:
      #constructor, #.methodname
      name: '.createItem'
      #Type=MaterialType, Amount=Integer, Data=Short
      parameters: 'item.getType()'
    setAmount:
      name: 'setAmount'
      #Amount=Integer
      parameters: 'item.getAmount()'
    setDisplayName:
      name: 'setName'
      #item.<Method>, itemMeta.<Method>
      parameters: 'itemMeta.getDisplayName()'
    setData:
      name: 'setData'
      #item.<Method>, itemMeta.<Method>
      parameters: 'item.getMaterialData()'
    setLore:
      name: 'setLore'
      #item.<Method>, itemMeta.<Method>
      parameters: 'itemMeta.getLore()'
    setCustomModelData:
      name: 'setCustomModelData'
      #item.<Method>, itemMeta.<Method>
      parameters: 'itemMeta.getCustomModelData()'
    addEnchants:
      name: 'addEnchant'
      #enchant.getEnchant(), enchant.getLevel()
      parameters: 'enchant.getEnchant(), enchant.getLevel()'
    addItemFlags:
      name: 'addItemFlags'
      #flag
      parameters: 'flag'
    build:
      name: 'buildItem'
      #item.<Method>, itemMeta.<Method>
      parameters: ''

Similar projects

Plugin →