Add permission for speeding.

This commit is contained in:
asofold 2012-09-03 08:46:56 +02:00
parent c759d24e7f
commit 7005b141cf
2 changed files with 5 additions and 0 deletions

View File

@ -199,6 +199,10 @@ public class SurvivalFly extends Check {
if (from.isOnGround() || to.isOnGround()) if (from.isOnGround() || to.isOnGround())
data.jumpAmplifier = 0D; data.jumpAmplifier = 0D;
// Speeding bypass permission:
if (hDistanceAboveLimit > 0 && player.hasPermission(Permissions.MOVING_SURVIVALFLY_SPEEDING))
hDistanceAboveLimit = 0D;
final double result = (Math.max(hDistanceAboveLimit, 0D) + Math.max(vDistanceAboveLimit, 0D)) * 100D; final double result = (Math.max(hDistanceAboveLimit, 0D) + Math.max(vDistanceAboveLimit, 0D)) * 100D;
data.survivalFlyJumpPhase++; data.survivalFlyJumpPhase++;

View File

@ -139,6 +139,7 @@ public class Permissions {
public static final String MOVING_SURVIVALFLY = MOVING + ".survivalfly"; public static final String MOVING_SURVIVALFLY = MOVING + ".survivalfly";
public static final String MOVING_SURVIVALFLY_BLOCKING = MOVING_SURVIVALFLY + ".blocking"; public static final String MOVING_SURVIVALFLY_BLOCKING = MOVING_SURVIVALFLY + ".blocking";
public static final String MOVING_SURVIVALFLY_SNEAKING = MOVING_SURVIVALFLY + ".sneaking"; public static final String MOVING_SURVIVALFLY_SNEAKING = MOVING_SURVIVALFLY + ".sneaking";
public static final String MOVING_SURVIVALFLY_SPEEDING = MOVING_SURVIVALFLY + ".speeding";
public static final String MOVING_SURVIVALFLY_SPRINTING = MOVING_SURVIVALFLY + ".sprinting"; public static final String MOVING_SURVIVALFLY_SPRINTING = MOVING_SURVIVALFLY + ".sprinting";
public static final String MOVING_SURVIVALFLY_STEP = MOVING_SURVIVALFLY + ".step"; public static final String MOVING_SURVIVALFLY_STEP = MOVING_SURVIVALFLY + ".step";