mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-04 14:38:47 +00:00
Fix for issue #44
This commit is contained in:
1 parent
982a9b9637
commit
7454edf8d6
1 file changed
+4
-4
@@ -177,7 +177,7 @@ public class Backend
|
|||||||
|
|
||||||
public boolean checkYSpeed(Player player,double y)
|
public boolean checkYSpeed(Player player,double y)
|
||||||
{
|
{
|
||||||
if(player.getVehicle() == null && y > Y_SPEED_MAX && !isVelocity(player))
|
if(!player.isInsideVehicle() && y > Y_SPEED_MAX && !isVelocity(player))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -362,7 +362,7 @@ public class Backend
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(!isMovingExempt(player) && !Utilities.isOnLadder(player))
|
if(!isMovingExempt(player) && !Utilities.isOnLadder(player) && !player.isInsideVehicle())
|
||||||
{
|
{
|
||||||
double y1 = player.getLocation().getY();
|
double y1 = player.getLocation().getY();
|
||||||
String name = player.getName();
|
String name = player.getName();
|
||||||
@@ -433,7 +433,7 @@ public class Backend
|
|||||||
double y1 = distance.fromY();
|
double y1 = distance.fromY();
|
||||||
double y2 = distance.toY();
|
double y2 = distance.toY();
|
||||||
Block block = player.getLocation().getBlock().getRelative(BlockFace.DOWN);
|
Block block = player.getLocation().getBlock().getRelative(BlockFace.DOWN);
|
||||||
if(y1 == y2 && !isMovingExempt(player) && player.getVehicle() == null && player.getFallDistance() == 0 && !Utilities.isOnLilyPad(player))
|
if(y1 == y2 && !isMovingExempt(player) && !player.isInsideVehicle() && player.getFallDistance() == 0 && !Utilities.isOnLilyPad(player))
|
||||||
{
|
{
|
||||||
String name = player.getName();
|
String name = player.getName();
|
||||||
if(Utilities.cantStandAt(block) && !Utilities.isOnLilyPad(player) && Utilities.cantStandAt(player.getLocation().getBlock()) && player.getLocation().getBlock().getType() != Material.WATER && player.getLocation().getBlock().getType() != Material.STATIONARY_WATER)
|
if(Utilities.cantStandAt(block) && !Utilities.isOnLilyPad(player) && Utilities.cantStandAt(player.getLocation().getBlock()) && player.getLocation().getBlock().getType() != Material.WATER && player.getLocation().getBlock().getType() != Material.STATIONARY_WATER)
|
||||||
@@ -488,7 +488,7 @@ public class Backend
|
|||||||
|
|
||||||
public boolean checkAscension(Player player, double y1, double y2)
|
public boolean checkAscension(Player player, double y1, double y2)
|
||||||
{
|
{
|
||||||
if(!isMovingExempt(player) && player.getLocation().getBlock().getType() != Material.WATER && player.getLocation().getBlock().getType() != Material.STATIONARY_WATER && !Utilities.isOnLadder(player))
|
if(!isMovingExempt(player) && player.getLocation().getBlock().getType() != Material.WATER && player.getLocation().getBlock().getType() != Material.STATIONARY_WATER && !Utilities.isOnLadder(player) && !player.isInsideVehicle())
|
||||||
{
|
{
|
||||||
String name = player.getName();
|
String name = player.getName();
|
||||||
if(y1 < y2)
|
if(y1 < y2)
|
||||||
|
|||||||
Reference in new issue
Block a user