GuiElementGroup group = new GuiElementGroup('g'); for (String text : texts) { // Add an element to the group // Elements are in the order they got added to the group and don't need to have the same type. group.addElement((new StaticGuiElement('e', new ItemStack(Material.DIRT), text); } gui.addElement(group);