use input system in another script

I have a controller script that contains

   private void Awake()
   {
       playerController = new PlayerController();
       playerController.PlayerInput.Jump.performed += JumpPressed;  
   }

   public void JumpPressed(InputAction.CallbackContext obj)
   {
       Debug.Log("call");
   }

then i have a combat state where i would like to check if say jump is pressed. In the old inputsystems used

       if (Input.GetButtonDown("Jump"))
       {
           player.StateMachine.ChangeState(player.JumpState);
       }

how do i change

Input.GetButtonDown("JUMP")

to work with my newly set up playerController

i have many different player states that i only want certain interactions to be able to happen if i put the Jump function inside JumpPressed you would be able to jump at any time
so that is why i want to check if GetButtonDown inside the state and not the controller

Except if you also check that you’re in a state when jump is allowed…

Which is a totally inefficient way of doing it, polling the input state can be done in the good old input manager. But if you want to use the new input system and polling, there are triggered properties in actions. So you can poll if it happened this frame.

thank you this makes sense.
I am trying to use the new input system for a couple of reasons but don’t want to refactor the whole project. I will take a look at the triggered properties that you referred to.