mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2025-02-03 02:21:21 +01:00
Javadoc
This commit is contained in:
parent
97645ada4d
commit
ad69c34a20
@ -4,19 +4,16 @@ import org.bukkit.util.Vector;
|
|||||||
|
|
||||||
public class VelocityChecks {
|
public class VelocityChecks {
|
||||||
/**
|
/**
|
||||||
* Checks to see if the velocity is unsafe. This is taken from Papers 0054-Add-velocity-warnings.patch
|
* Checks to see if the velocity is unsafe. This is taken from Papers 0054-Add-velocity-warnings.patch.
|
||||||
* @param vel
|
*
|
||||||
* @return
|
* @param vel The velocity.
|
||||||
|
* @return If unsafe.
|
||||||
*/
|
*/
|
||||||
public static boolean isUnsafeVelocity(Vector vel) {
|
public static boolean isUnsafeVelocity(Vector vel) {
|
||||||
final double x = vel.getX();
|
final double x = vel.getX();
|
||||||
final double y = vel.getY();
|
final double y = vel.getY();
|
||||||
final double z = vel.getZ();
|
final double z = vel.getZ();
|
||||||
|
|
||||||
if (x > 4 || x < -4 || y > 4 || y < -4 || z > 4 || z < -4) {
|
return x > 4 || x < -4 || y > 4 || y < -4 || z > 4 || z < -4;
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user