Check for sprinting while standing still

This commit is contained in:
h31ix committed 2012-12-15 21:02:45 -05:00
1 parent 69f58e08e1
commit 2fc17b87ca
4 files changed
+18 -3

No files matched your search

@@ -340,7 +340,7 @@ public class Backend
}
}
public boolean checkSprint(PlayerToggleSprintEvent event)
public boolean checkSprintHungry(PlayerToggleSprintEvent event)
{
Player player = event.getPlayer();
if (event.isSprinting())
@@ -353,6 +353,11 @@ public class Backend
}
}
public boolean checkSprintStill(Player player, Location from, Location to)
{
return player.isSprinting() && from.getX() == to.getX() && from.getZ() == to.getZ();
}
public boolean checkWaterWalk(Player player, double x, double y, double z)
{
Block block = player.getLocation().getBlock();