How can I get the old position? I can't find this method, I've tried it
if (player.getX() != player.xOld || player.getY() != player.yOld || player.getZ() != player.zOld) {
System.out.println("Moving...");
}
but it not works
What's the event when player moves and how can I get the player location, I tried it but i don't know if it's correct
@SubscribeEvent
public static void move(LivingEvent.LivingTickEvent event) {
if (event.getEntity() instanceof Player player) {
if (!player.onGround()) return;
/* get player location here */
}
}