Class MenubarItemFile

java.lang.Object
com.thecsdev.betterstats.api.mcbs.view.menubar.MenubarItem
com.thecsdev.betterstats.mcbs.view.menubar.MenubarItemFile
All Implemented Interfaces:
com.thecsdev.commonmc.api.client.gui.widget.TDropdownWidget.Entry

@Internal @Environment(CLIENT) public final class MenubarItemFile extends MenubarItem
MenubarItem implementation for "File".
  • Field Details

  • Constructor Details

    • MenubarItemFile

      public MenubarItemFile()
  • Method Details

    • getDisplayName

      @NotNull public final @NotNull net.minecraft.network.chat.Component getDisplayName()
      Description copied from class: MenubarItem
      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
      Specified by:
      getDisplayName in class MenubarItem
    • createContextMenu

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

      @Internal public static final void showOpenFileDialog(@NotNull @NotNull net.minecraft.client.Minecraft client, @NotNull @NotNull McbsEditor mcbsEditor) throws NullPointerException
      Shows the "Open File" dialog and handles loading the selected McbsFile into a new McbsEditorTab.
      Parameters:
      client - The Minecraft client instance.
      mcbsEditor - The McbsEditor instance to add the new tab to.
      Throws:
      NullPointerException - If an argument is null.