explicitly ignore vehicles with movingCheck (skypirates) and up the

threshold for jumping by 1, meaning the jumping arc can be a bit
longer than before (but not higher at total).
This commit is contained in:
Evenprime 2011-03-21 15:32:18 +01:00
parent c655086b4e
commit e4af83b425
3 changed files with 14 additions and 6 deletions

View File

@ -3,7 +3,7 @@ name: NoCheatPlugin
author: Evenprime
main: cc.co.evenprime.bukkit.nocheat.NoCheatPlugin
version: 0.7.2
version: 0.7.2a
commands:
nocheat:

View File

@ -110,12 +110,14 @@ public class NoCheatConfiguration {
movingActionNormal = c.getString("moving.action.med", "logmed reset");
movingActionHeavy = c.getString("moving.action.high", "loghigh reset");
speedhackActionMinor = c.getString("speedhack.action.low", "loglow");
speedhackActionNormal = c.getString("speedhack.action.med", "logmed");
speedhackActionHeavy = c.getString("speedhack.action.high", "loghigh");
speedhackActionMinor = c.getString("speedhack.action.low", "loglow reset");
speedhackActionNormal = c.getString("speedhack.action.med", "logmed reset");
speedhackActionHeavy = c.getString("speedhack.action.high", "loghigh reset");
airbuildAction = c.getString("airbuild.action", "logmed deny");
System.out.println(airbuildAction);
// 1 is minimum. This is needed to smooth over some minecraft bugs like
// when a minecart gets broken while a player is inside it (which causes the player to "move"
// up 1.0D which is much more than a usual jump would allow in 1 event

View File

@ -22,7 +22,7 @@ public class MovingCheck {
// previously-calculated upper bound values for jumps. Minecraft is very deterministic when it comes to jumps
// Each entry represents the maximum gain in height per move event.
static final int jumpingLimit = 3;
static final int jumpingLimit = 4;
static final double jumpingHeightLimit = 1.3D;
static double stepHeight = 0.501D;
@ -175,12 +175,18 @@ public class MovingCheck {
data.movingLocation = null;
}
if(event.getPlayer().isInsideVehicle()) {
data.movingSetBackPoint = null;
data.speedhackSetBackPoint = null;
return;
}
// The actual movingCheck starts here
// Get the two locations of the event
Location from = event.getFrom();
Location to = event.getTo();
// First check the distance the player has moved horizontally
// TODO: Make this check much more precise
double xDistance = Math.abs(from.getX() - to.getX());