Class DynamicKeybindActionRegistry
java.lang.Object
dev.munebase.dynamickeybinds.action.DynamicKeybindActionRegistry
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 Summary
Modifier and TypeMethodDescriptionstatic voidDispatch an action to its registered handler.static DynamicKeybindActionHandlergetHandler(String actionID) Get a registered handler by action ID.static voidregister(String actionID, DynamicKeybindActionHandler handler) Register a handler for a specific action ID.
-
Method Details
-
register
Register a handler for a specific action ID.- Parameters:
actionID- unique action identifier (for example,mymod:cast_spell)handler- action handler implementation
-
dispatch
Dispatch an action to its registered handler.- Parameters:
actionID- action identifierdata- NBT payload associated with this action instance
-
getHandler
Get a registered handler by action ID.- Parameters:
actionID- action identifier- Returns:
- registered handler, or
nullif no handler exists
-