mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-01 22:14:49 +00:00
Compliance with Java standards via Sonar plus a few xray fixes.
This commit is contained in:
1 parent
46ec0d736d
commit
55eb3738f7
23 files changed
+463
-483
No files matched your search
@@ -3,8 +3,8 @@ package net.h31ix.anticheat.checks;
|
||||
import org.bukkit.Location;
|
||||
|
||||
public class LengthCheck {
|
||||
Location l1, l2;
|
||||
//Used for checking how far a player travels on an event and how far they are from another location
|
||||
private Location l1, l2;
|
||||
|
||||
public LengthCheck(Location l1, Location l2)
|
||||
{
|
||||
this.l1 = l1;
|
||||
@@ -13,26 +13,17 @@ public class LengthCheck {
|
||||
|
||||
public double getXDifference()
|
||||
{
|
||||
double bx = l1.getX();
|
||||
double px = l2.getX();
|
||||
double xdiff = Math.abs(bx-px);
|
||||
return xdiff;
|
||||
return Math.abs(l1.getX()-l2.getX());
|
||||
}
|
||||
|
||||
public double getZDifference()
|
||||
{
|
||||
double bz = l1.getZ();
|
||||
double pz = l2.getZ();
|
||||
double zdiff = Math.abs(bz-pz);
|
||||
return zdiff;
|
||||
return Math.abs(l1.getZ()-l2.getZ());
|
||||
}
|
||||
|
||||
public double getYDifference()
|
||||
{
|
||||
double by = l1.getY();
|
||||
double py = l2.getY();
|
||||
double ydiff = Math.abs(by-py);
|
||||
return ydiff;
|
||||
return Math.abs(l1.getY()-l2.getY());
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user