Class DynamicKeybindActionRegistry

java.lang.Object
dev.munebase.dynamickeybinds.action.DynamicKeybindActionRegistry

public final class DynamicKeybindActionRegistry extends Object
Global registry for custom keybind action handlers. This static registry is the central dispatch point for dynamic keybind actions. Third-party mods register handlers here, and those handlers are invoked whenever a keybind with the matching action ID is pressed.
  • Method Details

    • register

      public static void register(String actionID, DynamicKeybindActionHandler handler)
      Register a handler for a specific action ID.
      Parameters:
      actionID - unique action identifier (for example, mymod:cast_spell)
      handler - action handler implementation
    • dispatch

      public static void dispatch(String actionID, net.minecraft.nbt.CompoundTag data)
      Dispatch an action to its registered handler.
      Parameters:
      actionID - action identifier
      data - NBT payload associated with this action instance
    • getHandler

      public static DynamicKeybindActionHandler getHandler(String actionID)
      Get a registered handler by action ID.
      Parameters:
      actionID - action identifier
      Returns:
      registered handler, or null if no handler exists