Class ItemEffectRegistry

java.lang.Object
com.csse3200.game.components.collectables.effects.ItemEffectRegistry

public final class ItemEffectRegistry extends Object
Registry mapping effect type strings to their corresponding handlers. Initialise once with registerDefaults() at game startup.
  • Method Details

    • register

      public static void register(String type, ItemEffectHandler handler)
      Register or replace a handler for a type (e.g. "potion:heal").
    • get

      public static ItemEffectHandler get(String type)
      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.