RebarInventoryEffectItem

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
abstract val baseTickInterval: Long

Determines the rate at which the onTick method will be called. onTick will be called at baseTickInterval * RebarConfig.INVENTORY_TICKER_BASE_RATE

Link copied to clipboard

Functions

Link copied to clipboard
@MustBeInvokedByOverriders
open fun onAddedToInventory(player: Player)

Apply the effect of this item onto the player

Link copied to clipboard
@MustBeInvokedByOverriders
open fun onRemovedFromInventory(player: Player)

Remove the effect from the player. Best-effort removal therefore is no guarantee that the player is still connected or that the RebarItem.stack is up to date with the actual ItemStack when it runs.

Link copied to clipboard
@MustBeInvokedByOverriders
open override fun onTick(player: Player)

Called when the item is detected in the player's inventory. will be called at baseTickInterval * [RebarConfig.inventoryTickerBaseRate