Nitpicky stuff

This commit is contained in:
h31ix committed 2013-01-14 20:28:52 -05:00
1 parent d12fb048df
commit d5d705fbe4
10 files changed
+401 -266

No files matched your search

@@ -122,7 +122,7 @@ public class AnticheatManager {
public String getEventChainReport() {
String gen = "";
if (!configuration.eventChains())
return "Event Chains is disabled in the configuration, If @h31ix or @SuPaHsPii need this, please re enable it in the configuration.";
return "Event Chains is disabled by the configuration.";
for (Entry<String, RegisteredListener[]> e : eventchains.entrySet()) {
String toadd = "";
@@ -306,8 +306,6 @@ public class Backend {
} else if (player.isSprinting()) {
reason = "while sprinting ";
max = magic.XZ_SPEED_MAX_SPRINT;
} else {
max = magic.XZ_SPEED_MAX;
}
if (x > max || z > max) {
int num = this.increment(player, speedViolation, magic.SPEED_MAX);
@@ -431,7 +429,7 @@ public class Backend {
}
public CheckResult checkYAxis(Player player, Distance distance) {
if (distance.getYDifference() > 400 || distance.getYDifference() < 0) {
if (distance.getYDifference() > magic.TELEPORT_MIN || distance.getYDifference() < 0) {
return PASS;
}
if (!isMovingExempt(player) && !Utilities.isClimbableBlock(player.getLocation().getBlock()) && !Utilities.isClimbableBlock(player.getLocation().add(0, -1, 0).getBlock()) && !player.isInsideVehicle() && !Utilities.isInWater(player)) {
@@ -542,7 +540,7 @@ public class Backend {
}
public CheckResult checkFlight(Player player, Distance distance) {
if (distance.getYDifference() > 400) {
if (distance.getYDifference() > magic.TELEPORT_MIN) {
// This was a teleport, so we don't care about it.
return PASS;
}
@@ -926,10 +924,6 @@ public class Backend {
return justAnimated(player);
}
public boolean justAnimated(Player player, Entity e) {
return justAnimated(player);
}
private boolean justAnimated(Player player) {
String name = player.getName();
if (animated.containsKey(name)) {
@@ -107,14 +107,10 @@ public class User {
return goodLocation;
}
public boolean hasGoodLocation() {
return goodLocation != null;
}
public void setGoodLocation(Location e) {
if (Utilities.cantStandAtExp(e)) { return; }
if (e.getBlock().isLiquid() && !Utilities.isFullyInWater(e)) { return; }
if (Utilities.cantStandAtExp(e) || (e.getBlock().isLiquid() && !Utilities.isFullyInWater(e))) {
return;
}
goodLocation = e;
}