Skip to content

Commit

Permalink
Add server side velocity to debugging a move.
Browse files Browse the repository at this point in the history
  • Loading branch information
asofold committed Nov 1, 2014
1 parent d013f28 commit 0118f43
Showing 1 changed file with 3 additions and 0 deletions.
Expand Up @@ -5,6 +5,7 @@
import org.bukkit.Location;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.util.Vector;

import fr.neatmonster.nocheatplus.compat.MCAccess;
import fr.neatmonster.nocheatplus.utilities.BlockProperties;
Expand Down Expand Up @@ -202,6 +203,8 @@ public static void outputMoveDebug(final Player player, final PlayerLocation fro
// TODO: Check backwards compatibility (1.4.2). Remove try-catch
builder.append("\n(walkspeed=" + player.getWalkSpeed() + " flyspeed=" + player.getFlySpeed() + ")");
} catch (Throwable t){}
final Vector v = player.getVelocity();
builder.append("(svel=" + v.getX() + "," + v.getY() + "," + v.getZ() + ")");
if (player.isSprinting()){
builder.append("(sprinting)");
}
Expand Down

0 comments on commit 0118f43

Please sign in to comment.