Class MenubarItem

java.lang.Object
com.thecsdev.betterstats.api.mcbs.view.menubar.MenubarItem
All Implemented Interfaces:
com.thecsdev.commonmc.api.client.gui.widget.TDropdownWidget.Entry
Direct Known Subclasses:
MenubarItemAbout, MenubarItemFile, MenubarItemView

@Environment(CLIENT) public abstract class MenubarItem extends Object implements com.thecsdev.commonmc.api.client.gui.widget.TDropdownWidget.Entry
Represents a single button in McbsEditorGUI's menubar.
  • Constructor Details

    • MenubarItem

      public MenubarItem()
  • Method Details

    • getDisplayName

      @NotNull public abstract @NotNull net.minecraft.network.chat.Component getDisplayName()
      Returns the display name for this MenubarItem, which is shown as the label in the menubar.
      Specified by:
      getDisplayName in interface com.thecsdev.commonmc.api.client.gui.widget.TDropdownWidget.Entry
    • createContextMenu

      @NotNull public abstract @NotNull com.thecsdev.commonmc.api.client.gui.ctxmenu.TContextMenu createContextMenu(@NotNull @NotNull net.minecraft.client.Minecraft client, @NotNull @NotNull McbsEditor mcbsEditor)
      Creates the context menu that is shown when this MenubarItem is clicked in the menubar.
      Parameters:
      client - The Minecraft instance the GUI belongs to.
      mcbsEditor - The McbsEditorGUI's McbsEditor instance.