Class McbsEditorTab

java.lang.Object
com.thecsdev.betterstats.api.mcbs.controller.tab.McbsEditorTab
Direct Known Subclasses:
McbsEditorFileTab, McbsEditorHomepageTab, McbsEditorNullTab, McbsEditorSettingsTab

public abstract class McbsEditorTab extends Object
This Class serves as a controller component in the MVC architecture. Its job is to represent a "tab" in a given McbsEditor.
See Also:
  • Constructor Details

    • McbsEditorTab

      public McbsEditorTab()
  • Method Details

    • hashCode

      public abstract int hashCode()
      To prevent the McbsEditors from opening duplicate tabs, it is essential to override this method along with equals(Object) to enforce non-fungibility.
      Overrides:
      hashCode in class Object
      See Also:
    • equals

      public abstract boolean equals(@Nullable @Nullable Object obj)
      To prevent the McbsEditors from opening duplicate tabs, it is essential to override this method along with hashCode() to enforce non-fungibility.
      Overrides:
      equals in class Object
      See Also:
    • getEditCount

      public final long getEditCount()
      Returns the total number of edits made via this McbsEditorTab instance. This value increments each time a change occurs within this tab.

      This can be used to track changes and determine if this tab's state has been modified since it was last checked.

    • addEditCount

      public final void addEditCount()
      Increments the getEditCount() value by 1.

      This method is to be automatically invoked whenever a modification occurs within this tab.

      See Also:
    • getDisplayName

      @NotNull public abstract @NotNull net.minecraft.network.chat.Component getDisplayName()
      This method provides the display name that will be shown in the user interface for this particular tab within an McbsEditor.