Player's sprint toggled of when player start fighting?

Discussion in 'Spigot Help' started by AleksBG1, Jul 10, 2018.

  1. Hello guys, I have a problem, so lets beggin to problem:

    When player start fighting each other sprint is toggled of i don't know why that happend? Someone help me?

    Here is my plugin list:
  2. joehot200


    That is a normal Minecraft mechanic. It's controlled by the client, so there is no way for you to be able to change it.

    Just tell players to hold the control key, I guess.

    I don't know if p.setSprinting(true) actually makes the client sprint... Something to be tested I guess? I don't know. It's late. I'm tired. Too lazy to test it.
  3. I think to make it with TogglePlayerSprinting event, and if(!e.getPlayer().isSprinting) ? e.getPlayer().setSprinting(true) : return;
  4. joehot200


    You can try it, yes. I have no guarantee it will work. You could also try cancelling the event, if it's cancellable.