Added method to register a custom packet