Adding new Velocity (B), finally added working log functionality

This commit is contained in:
Dawson
2022-08-28 17:08:36 -04:00
parent 25606997fa
commit da19394d54
9 changed files with 353 additions and 195 deletions
@@ -162,7 +162,6 @@ public class PacketHandler {
player.getVelocityHandler().onPre(packet);
} else player.getVelocityHandler().onPost(packet);
if(ka.isEnd() && player.getInfo().getVelocityHistory().contains(velocity)) {
player.getOnVelocityTasks().forEach(task -> task.accept(velocity));
player.getInfo().setDoingVelocity(false);
player.getInfo().getVelocity().reset();
synchronized (player.getInfo().getVelocityHistory()) {
@@ -170,6 +169,10 @@ public class PacketHandler {
}
}
});
player.runKeepaliveAction(ka -> {
if(player.getInfo().getVelocityHistory().contains(velocity))
player.getOnVelocityTasks().forEach(task -> task.accept(velocity));
}, 1);
}
break;
}