Class ItemEffectRegistry
java.lang.Object
com.csse3200.game.components.collectables.effects.ItemEffectRegistry
Registry mapping effect type strings to their corresponding handlers.
Initialise once with
registerDefaults()
at game startup.-
Method Summary
Modifier and TypeMethodDescriptionstatic void
clear()
Clear all handlersstatic ItemEffectHandler
Get the handler for a type, or null if none registered.static void
register
(String type, ItemEffectHandler handler) Register or replace a handler for a type (e.g.static void
Register built-in handlers.
-
Method Details
-
register
Register or replace a handler for a type (e.g. "potion:heal"). -
get
Get the handler for a type, or null if none registered. -
clear
public static void clear()Clear all handlers -
registerDefaults
public static void registerDefaults()Register built-in handlers.
-