Class StatsTab
java.lang.Object
io.github.thecsdev.betterstats.api.client.registry.StatsTab
- Direct Known Subclasses:
BSConfigTab
,BSCreditsTab
,GeneralStatsTab
,ItemStatsTab
,MobStatsTab
,PlayerBadgeStatsTab
Represents a "statistics tab"
Object
used in StatsTabPanel
for initializing a "statistics tab"'s GUI.
Examples include like the "General", "Items", and "Mobs" tabs.
- See Also:
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal Optional
<net.minecraft.util.Identifier> getId()
abstract net.minecraft.text.Text
getName()
Returns the name of thisStatsTab
.
ThisText
will be rendered on the GUI to indicate the tab's name.void
initFilters
(StatsTab.FiltersInitContext initContext) Invoked when aStatFiltersPanel
GUI is initializing for a givenStatsTab
.abstract void
initStats
(StatsTab.StatsInitContext initContext) Invoked when aStatsTabPanel
GUI is initializing for a givenStatsTab
.boolean
Returnstrue
if thisStatsTab
should appear in theSelectStatsTabWidget
's dropdown menu at the time of theSelectStatsTabWidget
's creation.
-
Constructor Details
-
StatsTab
public StatsTab()
-
-
Method Details
-
getName
public abstract net.minecraft.text.Text getName()Returns the name of thisStatsTab
.
ThisText
will be rendered on the GUI to indicate the tab's name. -
initStats
Invoked when aStatsTabPanel
GUI is initializing for a givenStatsTab
.Use this to initialize the
StatsTab
's GUI.- Parameters:
initContext
- TheStatsTab.StatsInitContext
.
-
initFilters
Invoked when aStatFiltersPanel
GUI is initializing for a givenStatsTab
.Use this to initialize the
StatFilterSettings
GUI.- Parameters:
initContext
- TheStatsTab.FiltersInitContext
.
-
getId
Returns anOptional
containing the uniqueIdentifier
of thisStatsTab
. TheOptional
will containnull
if thisStatsTab
isn't registered.- See Also:
-
isAvailable
public boolean isAvailable()Returnstrue
if thisStatsTab
should appear in theSelectStatsTabWidget
's dropdown menu at the time of theSelectStatsTabWidget
's creation.
-