@Override
public void initElements() {
this.addElement(new ButtonElement<>(this, "<", 0, 0, 30, 20, button -> {
this.mc.displayGuiScreen(this.parent);
return true;
}).withColorScheme(this.getReturnButtonColorScheme()));
this.addElement(new LabelElement<>(this, this.parentName, 35, 6));
this.addElement(new LabelElement<>(this, this.mod.name().toUpperCase() + " SETTINGS", 35, 26));
ListElement<ConfigGUI> categoryList = (ListElement<ConfigGUI>) new ListElement<>(this, 0, 40, 120, this.height - 40, this.categories.stream().map(ConfigCategory::getName).collect(Collectors.toList()), 20, list -> {
this.selectedCategory = this.categories.get(list.getSelectedIndex());
this.propertyElements.values().forEach(this::removeElement);
this.propertyElements.clear();
return true;
}).withPersistence(true).withColorScheme(this.getSidebarColorScheme());
categoryList.setSelectedIndex(0);
this.selectedCategory = this.categories.get(0);
this.addElement(categoryList);
this.propertyElements.clear();
}