mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-01 22:14:49 +00:00
Remove sight check for now, for some reason the CB method is screwed.
This commit is contained in:
1 parent
c0014c76b6
commit
23ced50eed
3 files changed
+15
-35
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
@@ -436,7 +436,7 @@ public class Metrics
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets an <b>unmodifiable</b> set of the plotter objects in the graph
|
||||
* Gets an <strong>unmodifiable</strong> set of the plotter objects in the graph
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
||||
@@ -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.
|
||||
* <p>
|
||||
* <b>VERY, VERY IMPORTANT</b>: 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.
|
||||
* <strong>VERY, VERY IMPORTANT</strong>: 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.
|
||||
* <br>
|
||||
* It is a <b>BUKKIT POLICY</b> that you include a boolean value in your config that prevents the auto-updater from running <b>AT ALL</b>.
|
||||
* It is a <strong>BUKKIT POLICY</strong> that you include a boolean value in your config that prevents the auto-updater from running <strong>AT ALL</strong>.
|
||||
* <br>
|
||||
* If you fail to include this option in your config, your plugin will be <b>REJECTED</b> when you attempt to submit it to dev.bukkit.org.
|
||||
* If you fail to include this option in your config, your plugin will be <strong>REJECTED</strong> when you attempt to submit it to dev.bukkit.org.
|
||||
* <p>
|
||||
* 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.
|
||||
* <br>
|
||||
|
||||
Reference in new issue
Block a user