RefreshableComponent

class RefreshableComponent(var component: ComponentText)(source)

缓存一个文本组件,并根据 tick 间隔判断是否需要刷新。 Caches a text component and checks whether its tick-based refresh is due.

Constructors

Link copied to clipboard
constructor(component: ComponentText)

Properties

Link copied to clipboard
var component: ComponentText

Functions

Link copied to clipboard
fun shouldRefresh(refreshTicks: Int?): Boolean

首次调用总是刷新;之后仅当配置了间隔且到期时刷新。 The first call always refreshes; later calls require a configured interval to elapse.