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