mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2025-01-03 22:37:44 +01:00
Adjust Knockback sprint time: Only count in if really sprinting, check
on monitor priority level.
This commit is contained in:
parent
778461da16
commit
544e0a06be
@ -277,7 +277,7 @@ public class FightListener implements Listener {
|
||||
* the event
|
||||
*/
|
||||
@EventHandler(
|
||||
ignoreCancelled = true, priority = EventPriority.LOWEST)
|
||||
ignoreCancelled = true, priority = EventPriority.MONITOR)
|
||||
public void onPlayerToggleSprint(final PlayerToggleSprintEvent event) {
|
||||
/*
|
||||
* ____ _ _____ _ ____ _ _
|
||||
@ -287,6 +287,6 @@ public class FightListener implements Listener {
|
||||
* |_| |_|\__,_|\__, |\___|_| |_|\___/ \__, |\__, |_|\___| |____/| .__/|_| |_|_| |_|\__|
|
||||
* |___/ |___/ |___/ |_|
|
||||
*/
|
||||
FightData.getData(event.getPlayer()).knockbackSprintTime = System.currentTimeMillis();
|
||||
if (event.isSprinting()) FightData.getData(event.getPlayer()).knockbackSprintTime = System.currentTimeMillis();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user