StatisticType

@CataloguedBy(catalogue = StatisticTypes::class)
interface StatisticType<T> : Iterable<Statistic<T>> , Translatable, Keyed

A type of a statistic.

Functions

Link copied to clipboard
open fun forEach(p0: Consumer<in Statistic<T>>)
Link copied to clipboard
abstract fun getStatistic(key: T): Statistic<T>

Gets the statistic for the given key, creating it if it does not already exist.

abstract fun getStatistic(key: T, formatter: StatisticFormatter): Statistic<T>

Gets the statistic for the given key with the given formatter, creating it if it does not already exist.

Link copied to clipboard
abstract fun hasStatistic(key: T): Boolean

Returns true if this type contains a statistic for the given key, false otherwise.

Link copied to clipboard
abstract operator fun iterator(): Iterator<Statistic<T>>
Link copied to clipboard
@NotNull
abstract fun key(): @NotNull Key
Link copied to clipboard
Link copied to clipboard
@NotNull
abstract fun translationKey(): @NotNull String

Properties

Link copied to clipboard
@get:JvmName(name = "registry")
abstract val registry: Registry<T>

The registry for this statistic type.