diff --git a/src/main/java/net/h31ix/anticheat/manage/Backend.java b/src/main/java/net/h31ix/anticheat/manage/Backend.java index 8c56cd5..1713607 100644 --- a/src/main/java/net/h31ix/anticheat/manage/Backend.java +++ b/src/main/java/net/h31ix/anticheat/manage/Backend.java @@ -344,7 +344,7 @@ public class Backend public boolean checkWaterWalk(Player player, double x, double y, double z) { Block block = player.getLocation().getBlock(); - + if (player.getVehicle() == null && !player.isFlying()) { if (block.isLiquid()) @@ -565,28 +565,8 @@ public class Backend public boolean checkSight(Player player, Entity entity) { - // Check to make sure the entity's head is not surrounded - Block head = entity.getWorld().getBlockAt((int) entity.getLocation().getX(), (int) (entity.getLocation().getY() + ((CraftEntity) entity).getHandle().getHeadHeight()), (int) entity.getLocation().getZ()); - boolean solid = false; - //TODO: This sucks. See if it's possible to not have as many false-positives while still retaining most of the check. - for (int x = -2; x <= 2; x++) - { - for (int z = -2; z <= 2; z++) - { - for (int y = -1; y < 2; y++) - { - if (head.getRelative(x, y, z).getTypeId() != 0) - { - if (net.minecraft.server.Block.byId[head.getRelative(x, y, z).getTypeId()].material.isSolid()) - { - solid = true; - break; - } - } - } - } - } - return solid ? true : player.hasLineOfSight(entity); + // TODO: Internal method was screwed. Rewrite. + return true; } public boolean checkFlight(Player player, Distance distance) @@ -612,8 +592,8 @@ public class Backend if (!isMovingExempt(player) && !Utilities.isHoveringOverWater(player.getLocation(), 1) && Utilities.cantStandAtExp(player.getLocation())) { /* if (y1 == y2 || y1 < y2) - { - + { + if (y1 == y2) { //Check if the player is on slabs or crouching on stairs @@ -625,20 +605,20 @@ public class Backend { return false; } - - + + int violation = flightViolation.containsKey(name) ? flightViolation.get(name) + 1 : 1; increment(player, flightViolation, violation); return violation > magic.FLIGHT_LIMIT; } */ - + if (!blocksOverFlight.containsKey(name)) { blocksOverFlight.put(name, 0D); } - + blocksOverFlight.put(name, (blocksOverFlight.get(name) + distance.getXDifference() + distance.getYDifference() + distance.getZDifference())); - + if (y1 > y2) { blocksOverFlight.put(name, (blocksOverFlight.get(name) - distance.getYDifference())); @@ -1010,7 +990,7 @@ public class Backend { if (waterSpeedViolation.containsKey(player.getName())) { - if (waterSpeedViolation.get(player.getName()) >= magic.WATER_SPEED_VIOLATION_MAX && Utilities.isHoveringOverWater(player.getLocation())) + if (waterSpeedViolation.get(player.getName()) >= magic.WATER_SPEED_VIOLATION_MAX && Utilities.isHoveringOverWater(player.getLocation())) { return true; } diff --git a/src/main/java/net/h31ix/anticheat/metrics/Metrics.java b/src/main/java/net/h31ix/anticheat/metrics/Metrics.java index 3d71984..0418ed6 100644 --- a/src/main/java/net/h31ix/anticheat/metrics/Metrics.java +++ b/src/main/java/net/h31ix/anticheat/metrics/Metrics.java @@ -436,7 +436,7 @@ public class Metrics } /** - * Gets an unmodifiable set of the plotter objects in the graph + * Gets an unmodifiable set of the plotter objects in the graph * * @return */ diff --git a/src/main/java/net/h31ix/anticheat/update/Updater.java b/src/main/java/net/h31ix/anticheat/update/Updater.java index a876957..7bb5ab4 100644 --- a/src/main/java/net/h31ix/anticheat/update/Updater.java +++ b/src/main/java/net/h31ix/anticheat/update/Updater.java @@ -37,11 +37,11 @@ import org.bukkit.plugin.Plugin; /** * Check dev.bukkit.org to find updates for a given plugin, and download the updates if needed. *

- * VERY, VERY IMPORTANT: Because there are no standards for adding auto-update toggles in your plugin's config, this system provides NO CHECK WITH YOUR CONFIG to make sure the user has allowed auto-updating. + * VERY, VERY IMPORTANT: Because there are no standards for adding auto-update toggles in your plugin's config, this system provides NO CHECK WITH YOUR CONFIG to make sure the user has allowed auto-updating. *
- * It is a BUKKIT POLICY that you include a boolean value in your config that prevents the auto-updater from running AT ALL. + * It is a BUKKIT POLICY that you include a boolean value in your config that prevents the auto-updater from running AT ALL. *
- * If you fail to include this option in your config, your plugin will be REJECTED when you attempt to submit it to dev.bukkit.org. + * If you fail to include this option in your config, your plugin will be REJECTED when you attempt to submit it to dev.bukkit.org. *

* An example of a good configuration option would be something similar to 'auto-update: true' - if this value is set to false you may NOT run the auto-updater. *