Fixed false positive

This commit is contained in:
Rammelkast committed 2016-07-17 20:34:04 +02:00
1 parent 81602bb5ae
commit 6ae16787fc
3 files changed
+5 -5

No files matched your search

@@ -458,13 +458,12 @@ public class Backend {
string = " with jump potion";
}
Block block = player.getLocation().getBlock();
if (!isMovingExempt(player) && !Utilities.isInWater(player) && !justBroke(player) && !Utilities.isClimbableBlock(player.getLocation().getBlock()) && !player.isInsideVehicle()) {
String name = player.getName();
if (!isMovingExempt(player) && !Utilities.isInWater(player) && !justBroke(player) && !Utilities.isClimbableBlock(player.getLocation().getBlock()) && !player.isInsideVehicle() && !YAxisCheck.isMoveUpBlock(player.getLocation().add(0, -1, 0).getBlock()) && !YAxisCheck.isMoveUpBlock(player.getLocation().add(0, -1.5, 0).getBlock())) {
if (y1 < y2) {
if (!block.getRelative(BlockFace.NORTH).isLiquid() && !block.getRelative(BlockFace.SOUTH).isLiquid() && !block.getRelative(BlockFace.EAST).isLiquid() && !block.getRelative(BlockFace.WEST).isLiquid()) {
increment(player, ascensionCount, max);
if (ascensionCount.get(player.getUniqueId()) >= max) {
return new CheckResult(CheckResult.Result.FAILED, player.getName() + " ascended " + ascensionCount.get(name) + " times in a row (max = " + max + string + ")");
return new CheckResult(CheckResult.Result.FAILED, player.getName() + " ascended " + ascensionCount.get(player.getUniqueId()) + " times in a row (max = " + max + string + ")");
}
}
} else {
@@ -88,7 +88,7 @@ public class YAxisCheck {
return PASS;
}
private static boolean isMoveUpBlock(Block block) {
public static boolean isMoveUpBlock(Block block) {
return MOVE_UP_BLOCKS.contains(block.getType());
}
@@ -107,7 +107,8 @@ public class EntityListener extends EventListener {
if (e.getDamager() instanceof Player) {
if (getCheckManager().willCheck((Player)e.getDamager(), CheckType.KILLAURA)) {
KillAuraCheck.doDamageEvent(e, (Player)e.getDamager());
}else if (getCheckManager().willCheck((Player)e.getDamager(), CheckType.CRITICALS)) {
}
if (getCheckManager().willCheck((Player)e.getDamager(), CheckType.CRITICALS)) {
CriticalsCheck.doDamageEvent(e, (Player)e.getDamager());
}
}