Class McbsEditorTab
java.lang.Object
com.thecsdev.betterstats.api.mcbs.controller.tab.McbsEditorTab
- Direct Known Subclasses:
McbsEditorFileTab, McbsEditorHomepageTab, McbsEditorNullTab, McbsEditorSettingsTab
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidIncrements thegetEditCount()value by1.abstract booleanTo prevent theMcbsEditors from opening duplicate tabs, it is essential to override this method along withhashCode()to enforce non-fungibility.abstract @NotNull net.minecraft.network.chat.ComponentThis method provides the display name that will be shown in the user interface for this particular tab within anMcbsEditor.final longReturns the total number of edits made via thisMcbsEditorTabinstance.abstract inthashCode()To prevent theMcbsEditors from opening duplicate tabs, it is essential to override this method along withequals(Object)to enforce non-fungibility.
-
Constructor Details
-
McbsEditorTab
public McbsEditorTab()
-
-
Method Details
-
hashCode
public abstract int hashCode()To prevent theMcbsEditors from opening duplicate tabs, it is essential to override this method along withequals(Object)to enforce non-fungibility. -
equals
To prevent theMcbsEditors from opening duplicate tabs, it is essential to override this method along withhashCode()to enforce non-fungibility. -
getEditCount
public final long getEditCount()Returns the total number of edits made via thisMcbsEditorTabinstance. 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 thegetEditCount()value by1.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 anMcbsEditor.
-